Skip to content

Playing Pong on the Video Game Shield with Potentiometers

by Layne on January 16, 2011

We recently received quite a lot of requests for a video game that doesn’t need Wii controllers. This afternoon I took ten minutes and adapted our popular two-player PONG game to use two potentiometers as controllers, instead of the Wii Nunchucks. The potentiometers will be connected to the Arduino’s analog inputs 0 and 1.

Connect 5v, 0v, A0, and A1

I used two trimmer-style potentiometers mounted in a breadboard. These potentiometers have three leads, and the center lead is commonly called “the wiper”. Connect the other two pins to 5v and Ground, and connect the wiper to analog 0 / analog 1. As the potentiometer is turned, the wiper will have a voltage between 0 and 5 volts, which is measured by the Arduino’s analog inputs 0 and 1. These measured analog voltages are then digitized and used to position each player’s paddle.


The new sketch, tv_2p_pong_potentiometers, is now available in our regular library zip, as well as on github.

From → Uncategorized

One Comment Leave one →
  1. Worked great! Thanks for the post.

Leave a Reply

Note: HTML is allowed. Your email address will not be published.

Subscribe to this comment feed via RSS