Introduction: Arduino Pong

This Instructable is based on a how-to written by James Bruce:

Note: This project will not work with the Arduino Yún. An Arduino Uno, Nano or one with a similar architecture is advised.

The requirements:

1x Arduino (I used the Uno. Again, the Yún won't work)

1x 470 ohm resistor

1x 1k ohm resistor (I used a 1.1k ohm resistor)

1x Jumper wire

2x 10k ohm Potentiometer

1x RCA video cable

1x Pushbutton

1x 10k ohm resistor

Step 1: Download the TV Out Library

You can download the library ( from here:

You'll want to unpack the .zip file and copy the resulting folders to either Program Files (x86)/Arduino/libraries or Documents/Arduino/libraries.

Step 2: The RCA Cable

Take on end of the RCA cable and strip the outer layer away. Gather up the shielding, twist it and put it away to one side. This is your ground. In the centre should be another cable with some plastic shielding around it. Strip this away as well. This is your signal line. Next you'll want to take your 470 ohm and 1k ohm resistor and solder them both to the signal line. Plug the 470 Ohm resistor into pin DO7 on your arduino and the 1k resistor into pin DO9. This will produce the analogue video input. After that you can take the jumper wire and solder it to the shielding outside of the RCA. This jumper wire needs to be plugged into one of your Arduino's GND pins. If you want you can test TV Out by loading in an example in the Arduino IDE (File>Examples>TVout>DemoPAL or DemoNTSC depending on your region)

Step 3: ​The Potentiometers

Each potentiometer should have 3 pins. The middle one needs to be connected to either A0 or A1 on your Arduino. One of the side pins (it doesn't matter which) should be connected to +5V and the other to GND. You can find a full Fritzing diagram and some pictures above. You can once again test this if you want by using an example from the Arduino IDE (File>Examples>Analog>AnalogInput)

Step 4: The Start Button

Next you'll want to wire a pushbutton to pin DO2. Again, a diagram and pictures can be found above.

Step 5: ​The Pong Code

You can download the Pong code (written by Lamonica and modified by duboisvb) from this pastebin:

Step 6: ​Have Fun!

That's everything. Pong is obviously a very simple game but you should still be able to get some fun out of it. If you want to speed the game up a bit try changing the 3 in if(frame % 3 == 0) to a 2 or even a 1. Credit goes to Alex in the comment section of the original how-to article for that one.