Arduino The Hunted Game
Arduino The Hunted Game
The Hunted Game
This project helps create a game called the hunted. One person will wear the arduino with an IR Sensor, 3 LED's and a Buzzer. You will start out with 3 lives represented by the LED's. Once shot 3 times your dead. The hunter will use a remote control from home, universal works best. Play with a friend that has it as well and you can play IR Tag.

Needed Components:

1x Breadboard
3x LED's
1x Arduino
1x Speaker
3x 220 Ohm Speakers
1x 100 or 220 Ohm Speaker
Wires

Components can be found at http://egrobotics.com/store/
This Project uses and Arduino Board and IR Add-on Kit

www.EGRobotics.com

The Code:

#define IRsensorPin 6
void setup(){
pinMode(3, OUTPUT);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
digitalWrite(10, HIGH);
digitalWrite(9, HIGH);
digitalWrite(8, HIGH);
delay(10000);
}
void loop(){ if (digitalRead(IRsensorPin)==LOW && digitalRead(8) == HIGH){
digitalWrite(8, LOW);
delay(5000);
}
if (digitalRead(IRsensorPin)==LOW && digitalRead(8) == LOW && digitalRead(9) == HIGH){
digitalWrite(9, LOW);
delay(5000);
}
if (digitalRead(IRsensorPin)==LOW && digitalRead(9) == LOW && digitalRead(8) == LOW){
digitalWrite(10, LOW);
analogWrite(3, 150);
}
}

Video:


Go to www.instructables.com/member/EGRobotics/ for more fun projects!
 
 

Tag cloud

make build easy simple arduino making homemade solar laser printed portable cheap mini building custom cardboard wooden create super lego turn paracord chocolate your paper light intel