Don't forget to rate this 'ible!
Ok, lets go!
Remove these ads by
Signing UpStep 1Materials and Tools
-Arduino Uno (This controls the LEDs and detects when the button is pressed.) -Can be purchased form makershed.com
-USB A-B cable (Sometimes called a printer cable.) -Should come with your arduino.
-Solderless breadboard (half sized) -Can be purchased from makershed.com
-5 Leds (Four of one color, and one of another.)
-Pushbutton switch -I bought mine at Radioshack
-small resistor (more if you are worried about burning your LEDs.)
-At least 15 or so breadboard jumper wires -Can be purchased from makershed.com
-A small amount of thin cardboard. I used empty cereal box.
Tools:
-Soldering Iron
-Electrical solder
-Computer
| « Previous Step | Download PDFView All Steps | Next Step » |














































Very neat idea!
I Built it with my 7 year old and he loved it (my little geek in training). It was our first Arduino game and this motivated him to keep building more and more! Please see photo for our improvised solder-less "remote" button
Thanks for posting this!
Happy Holidays
To have the lights flash to the right, then back the left, you need to change the code at the beginning of the loop, underneath "//Move the light", so that it does not jump back to the first LED when it reaches the side, but instead reverses the direction they blink in. If you can change the way the "LightPosition" variable gets set, you can make the light travel back and forth. You probably need another variable to keep track of which direction the light is traveling.
This is where you should look to make your changes in the code:
//Move the light.
if(millis() - lastMove >= pause)
{
lastMove = millis(); //Remember when we switched LED
LightPosition++; //increment the Light position.
if(LightPosition >= 6) LightPosition = 1;
move(LightPosition);//Update the light position.
}
Hope this helps.