Hi guys, I’ve been messing around with Arduino and i want to create a simple game using digital pins. The objective is simple. I have 5 LEDs setup in series and a pushbutton. If the button is pressed while the middle LED is lit, you win. If you press the button if the others are lit, you lose. I think something is wrong with my code. Please guys, help me out. I’ve been stuck for days.
Game.ino (830 Bytes)