The Hunted! This project helps create a game called

The Hunted!
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
frined that has it as well and you can play IR Tag.
Diagram:
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);
}
}