Pong was the first ever videogame that reached the mass market. For the first time in history, the concept of a “video game” was brought into the family home, thanks to the Atari 2600 – so it’s only right that we pay a little homage to this historical gem. Now, you can re-live that (admittedly somewhat boring gameplay)using an Arduino and some common components.
I won’t lie – it’s unlikely your daughter will be giving up her Nintendo DS, and this isn’t going to provide hours of fun for the whole family – but it is an awesome and easy project to improve your Arduino coding.
We’ll make two basic controllers, and the video will output to your TV through a standard composite video cable.
Requirements for Arduino Pong
- 470 ohm resistor x1
- 1k ohm resistor x1
- 10k ohm Potentiometer (twiddly variable resistor)x2
- Arduinox1 (any version)
- RCA plug x1 (if you have more than one, you can hook up sound too. One for the video is a bare minimum)
- Pushbutton switch x1
- 10k ohm resistor x1
You’ll also to download the TV Out Arduino library from here – get the TVoutBeta1.zip, the latest release. Place the resulting folders all into your /arduino/libraries directory, and restart the Arduino IDE if it’s open already.
Testing TV Out
Take your RCA plug and strip the outer layer away. Gather up the shielding, twist and put away to one side. This is your ground. In the center should be another cable with plastic shielding – again, strip this away so you have your signal line.
Solder both the 470 ohm and 1k ohm resistors to the center signal line of your RCA plug – this provides a sync signal and the actual video signal, combined to produce the analogue video input. The 470 ohm resistor should slot into digital IO pin D07, while the 1k ohm resistor goes to pin D09.