This project was inspired by this video from YouTube and the Pendulum Challenge Kit from Makershed.com. Its a simple game consisting of five LED lights and one pushbutton switch. The LEDs flash in a sequence and the player must press the button when the middle LED light is lit. The speed at which the lights flash increases until the player presses the button at the wrong time.

Don't forget to rate this 'ible!

Ok, lets go!

Step 1: Materials and Tools

These are the parts you'll need to build your own StopIt! game.

-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.

-Soldering Iron
-Electrical solder
Cool!<br><br>I just made one<br>
Looks good! Glad you enjoyed my instructable.
is it just ok to use arduino Diecimila than Uno? <br>will be the coding different?
I have never used a Diecimila but I would say just try it and see what happens! I don't know of any major differences between arduinos, so I imagine it would work. If you do try it out, please let me know how it goes. I'm curious.
i am not familiar with the move command... how can i make the lights go up and back and not just one direction
This is what the move function does: First, it turns of all of the LEDs, then it lights up the next one in the sequence. It knows which LED to light because it checks the &quot;LightPosition&quot; variable. <br><br>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 &quot;//Move the light&quot;, 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 &quot;LightPosition&quot; 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.<br><br>This is where you should look to make your changes in the code:<br>//Move the light.<br> if(millis() - lastMove &gt;= pause)<br> {<br> lastMove = millis(); //Remember when we switched LED<br> <br> LightPosition++; //increment the Light position.<br> if(LightPosition &gt;= 6) LightPosition = 1;<br> <br> move(LightPosition);//Update the light position.<br> }<br><br>Hope this helps.
<br>Very neat idea! <br><br>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 &quot;remote&quot; button <br><br>Thanks for posting this! <br><br>Happy Holidays
<p>Hey! We used your idea for a class in school! So much fun!!</p>
<p>how can I change the code so that when you make 5 successful stops, it will activate a servo?</p>
<p>Neat idea!</p><p>You could declare another integer variable at the top of the code and use that to keep track of how many correct stops have been made. Then, somewhere in the main loop portion, add an 'if' statement that checks if that variable is 5. Then you could put in the body of the 'if' statement your code to move the servo. Depending on your goal, you might also want to reset that variable to zero after successfully reaching 5 stops so that you can activate the servo again.</p>
Juggleboy, thanks for the reply. I have some idea what you are talking about, but I don't have any idea how to do this. I've been doing some studying on how to code, but for me it would be like learning a new language. I keep plugging away at it though. <br>
<p>I made this and it is really kind of cool and simple. Now I want to complicate matters.... I know nothing of coding really, but if someone can help me out here. I would like to add a couple of more LEDs, and have more than one that is the target, RED one, and I would like them to light randomly is possible. I want to make the game more challenging. Thanks...</p>
<p>Thanks for the simple directions</p>
<p>awesome project</p>
I made it. The lights go too slow for the first few rounds. How do I speed them up?
<p>Look for the line that initializes the &quot;pause&quot; variable in the Arduino sketch and replace the 1000 with a smaller number. The number you choose will be the initial length of time (in milliseconds) that the light will stay on a single LED before moving to the next one.</p><p>You might also want to tweak the portion of the code that decides how many LEDs to light up once the game is over, since the level of difficulty will have changed a little.</p>
Also. For me the button doesn't work all the time. I've tried multiple buttons. It's weird. Maybe it's with the code
<p>Buttons can be tricky to get right sometimes. Did you remember to include the resistor between the button and ground on Step 4? Make sure that it runs from the side of the button closest to the Arduino's input pin to the ground rail of the breadboard. That will ensure that the input pin reads a digital LOW when the button is not being pressed.</p><p>If that doesn't fix the problem, you could try to implement a way of &quot;debouncing&quot; the button. Debouncing is described on the Arduino website here: <a href="https://www.arduino.cc/en/Tutorial/Debounce" rel="nofollow">https://www.arduino.cc/en/Tutorial/Debounce</a></p><p>Basically, mechanical buttons tend to oscillate back and forth very quickly between being open and being closed in the short time that it takes to press or release the button. Although this oscillation is imperceptible to us humans, the Arduino picks up on it, which can cause unpredictable behavior.</p>
Okay; thank you.
<p>High school simple. Thanks</p>
<p>High school simple. Thanks</p>
<p>High school simple. Thanks</p>
<p>High school simple. Thanks</p>
<p>I used two arduino's</p><p>Hacked old printer into a ticket dispenser</p><p>1st arduino reads the coin op (led and photo cell) and send 5v to the 2nd arduino. And also run count down timer be4 it cuts off its 5v.</p><p>2nd arduino runs the game,buzzer and outputs to the transistor running the ticket dispenser.</p><p>video http://youtu.be/-Er-phJIcIY</p>
<p>Cool!</p><p>i made it.</p><p>LEDs blinks randomly and shows the score on lcd.. On wrong input buzer beeps 5 times.. :) </p><p>Thanks all of you.. Specily juggleboy. </p>
<p>hi , may i know the codes that you input ? thankyouuu :)</p>
<p>I'm having trouble with the code. How did everyone else do it? I clicked on the attachment, and a webpage opened with all of the lines of code together, not separated (as you can see in the photo). I copied this to the Arduino program, and, unsurprisingly, it didn't upload. How can I get the correct code file?</p>
I made one, its so cool and easy!! thanks for this instructable
<p>I tried making it, but I don't think the leds were getting enough power. They didn't light up all the way. Also I din't have the pushbutton so I just used a normal button. I seemed to work I got an output from the serial monitor. </p>
<p>I tried again, and this time I guess I wired everything okay because it works :D </p>
<p>Thank you for the code! I'm new in arduino world. I recently bought 1 to play with and I'm in love with it. I've learned new codes in this game project thanks to you!</p>
were do u get the code
The Arduino sketch is attached to step three. You can download it from there.
i have one more question, have u try to incorporate the game with sound? <br>i think it will be more fun. <br>
is it just ok to use arduino Diecimila than Uno? <br>will be the coding different?
i was planning that too.... <br>but still thanks for your reply, i appreciate it :) <br> <br>ok i will post it here if it works in Diecimila

About This Instructable




More by juggleboy:Upgrade Your Space Launch with a Physical Staging Button for Kerbal Space Program Computer Controlled RGB Led StopIt! LED Game (powered by arduino) 
Add instructable to: