Intro: Arduino Pong
Create a simple game of 1 dimensional pong using Arduino UNO, LED's, buttons, resistors and wires. Using these simple components you can create a fun little game to impress and challenge your friends.
Step 1: Materials
Parts List: 1 Arduino UNO, 1 Perfboard or Breadboard, 14 Wires, 8 LED's, 2 Buttons, 14 Wires, 8 330 ohm resistors, 2 10K ohm resistors
Step 2: Assemble
Place the wires, resistors, LED's, and buttons on the Arduino and breadboard as shown in the diagram. I have attached the jpeg of the diagram.It's difficult to tell which resistors go to which parts in the diagram. The 10k ohm resistors go with each of the buttons. The 330 ohm resistors go with the LED's. The breadboard used on the program is bigger than the one that I used so when you are assembling you may have to eliminate the unused spaces in between the buttons and LED's. Once you have the pieces assembled you're ready to move on to the next step.
Step 3: Coding
This is the code that I used. You can copy it from the website. Here's the link, http://pastebin.com/Q3vH0nwQ.Once you upload the code you're done. The game is pretty simple. The light travels from left to right and increases in speed with every change in direction. If you press the button too early or too late the other person will be awarded a point. The game goes on until someone reaches 4 points. When someone reaches 4 points the lights will cascade in their direction. Once the game ends it will restart automatically. I hope you enjoy.