Arduino Led Mini Game

In this arduino project I am going to make a simple mini game with leds. In this game the leds turn on and off the one after the other very quickly. When you push the button you see in the images the led that is on remains on and all the other stop blinking. The aim of this mini game is to push the button and make the middle led (the red led) stay on. If you don't succeed in doing it you just let the button and try again.
 

Step 1: Materials

Materials
You will need :
Arduino uno
1 breadboard
cables
1 pushbutton
1 piezo buzzer
1 resistor
2 blue leds
2 green leds
2 yellow leds
1 red led
You will need :
Arduino uno
1 breadboard
cables
1 pushbutton
1 piezo buzzer
1 resistor
2 blue leds
2 green leds
2 yellow leds
1 red led

Step 2: Making the circuit

Making the circuit

Connect a blue led from pin 13 to ground. Connect a green led from pin 12 to ground. Connect a yellow led from pin 11 to ground. Connect the red led from pin 10 to ground. Connect a yellow led from pin 9 to ground. Connect a green led from pin 8 to ground. Connect a blue led from pin 6 to ground. Connect the button to pin 4 , 5v and to the resistor to ground. Connect the piezo buzzer from pin 2 to ground.

Step 3: Code

DOWNLOAD


EmoticonEmoticon