Introduction: Ardu-pong! the Arduino Based Pong Console

Picture of Ardu-pong! the Arduino Based Pong Console

A while back the instructables robot made a post on Facebook about some guys who played pong on an Arduino (http://wayneandlayne.com/projects/video-game-shield/games/#pong)
but after looking around, i saw that everyone who did this was only worried about making it work. and often resulted as a very hard to use system with only potentiometers to use as controllers. so in my attempt at this, i decided that it needs to be much more polished if it is ever to be something of use. so heres how i did it:

UPDATE! ive managed to shink it down into an entire atari themed mint tin! check it out here 

Step 1: Get the Stuff.

so to do this, we are going to need a couple of things.
first off, we obviously need an Arduino, we are also going to need an atari joystick, a rs232 socket, a rca jack,  1Kohm resistor and a 330 ohm resistor, a switch for power, and something to cram all the guts into , i decided to use a busted digital tv receiver as my enclosure  

Step 2: Hack the Enclosure.

Picture of Hack the Enclosure.

now take your chosen enclosure and take it apart and remove all the circuit boards and junk you otherwise will not need, then mount your Arduino against the backside of the enclosure and drill a hole large enough for a usb cable to fit through, then cut out a hole for the serial port to be mounted through.

Step 3: Install the Rca Jack.

Picture of Install the Rca Jack.

before we install the rca jack we need to freeform the following circuit off of the pins of the rca jack .
then we can drill a hole in the back of the enclosure for the rca jack to come through and then glue it in place.

Step 4: Wire the Serial Port

Picture of Wire the Serial Port

now we have to wire the serial port to the pins on the arduino so we can get input from the joystick.
so using the following pinout, connect the following to the corresponding pins on the Arduino


pin1 up, to Arduino pin 7
pin2 dn, to Arduino pin 6
pin6 fire,to Arduino pin 2

Step 5: Wire the Rca Jack

Picture of Wire the Rca Jack

this is pretty simple just connect the 1kohm resistor lead to pin9 and the 330kohm resistor lead to pin8

Step 6: Software

Picture of Software

now we need to download and install the tvout library for the Arduino sdk here 
 
and once you have done that i have modded a version of pong for the arduino to take our input from the joystick you can get right from this instructable.

btw thanks pete

Step 7: Congratulations!!! Your Done (almost).

Picture of Congratulations!!! Your Done (almost).

now just install your power switch anywhere you'd like and wire it to control the power to the arduino, im not going to explain this, if you've gotten this far Im pretty shure you can handle it.

then assemble the enclosure, plug in the controller, upload the code, and plug it into the tv. if it worked you'll see somethin like this : 

Comments

aafent (author)2015-02-19

I have fix the old TVOUT libraries and I have port the code into the current version.

Some code modifications applied, also I have modify the code to replace the joystick with two potentiometers (one per user ).

New version of code is here: https://codebender.cc/sketch:86128

goldenshuttle (author)2014-02-15

kyle, this is a good post..many thanks...

kidos100 (author)2013-12-29

Can you use buttons?

yes

Could you point out in the code where to change it? I can't seem to find it.

kidos100 (author)kidos1002014-01-02

Also, why do you need the serial monitor?

honestly i did this 4 years ago, i dont remember much of the details associated with it

AtariSega (author)2013-11-09

Would I be able to use the Arduino to burn the game into the ATmega328 so I don't have to connect the whole thing to the computer each time I want to play the game?

actually after the code is uploaded, its never really connected to the computer after that

donjuanzx9 (author)2013-01-07

This should have been implemented to use pots, everyone has potentiometers not everyone has the joysticks you use.I have got pong on my screen but cant move the paddles.

donjuanzx9 (author)2013-01-07

Can we use a pot instead?

zomfibame (author)2012-12-16

This is very cool; well done. I am diggin' this. ... it's been a very long time since I've played Pong so I might be mistakin' because I was about 7 and now I'm in my mid 40's... but if I do remember correctly, the original Pong game came with knobs that basically worked like potentiometers. they looked a lot like over-sized dimmer switches for regular home lighting but they were black if memory serves me right. ... so this might be why when a lot of other people do a home-made Pong they use potentiometers.

TheRealDutchOwner (author)2012-03-20

You could use a Commodore 64 controller if you don't have an Atari one but you do have a C64 one. A Sega MegaDrive/Genesis controller MIGHT work, but that would need to be a official SEGA one, and even then i'm not sure.

Sega and most joystick producers followed the layout that Atari used, you could plug a megadrive/genesis controller into an Atari2600 and it'd work fine, so there shouldnt be any issues here I'd think.

doglitbug (author)2012-07-19

Why a 330 ohm, the image on the tv_out page has a 470

The nerdling (author)2012-02-25

is there anyway of making it single player?

hightekrednek2396 (author)2011-11-23

I cant get my arduino to output a tv signal ive tried every sketch i could find tried diferant version of the library and every tv in my house but i dont get any signal i was close one it showed text then went white diamond to black then repeats so i almost had it just it was off

computergeek321 (author)2011-02-01

can you use a sega genies controller and a serial cable

yes, you can use a sega master system controller too

XDule 97 (author)2011-04-24

I have a question. Does the controller output a analog or digital signal. If it outputs a analog why put it on pin6 and pin7 for an input. If it is a digital then its ok. And one more thing, will this damage the arduino. Please answer this, i really want to build this. Thanks for the instructable its awesome. :)

musick_08 (author)XDule 972011-06-13

the atari controller doesnt output a signal. it's basically just 6 momentary switches. No ics or anything of that sorts.

Nicky_G (author)2011-04-24

Hey, I was able to get my arduino to display imagines on my tv, but I'am unable to get the pong code compiled I get this error:

sketch_apr24b.cpp: In function 'void drawGameScreen()':
sketch_apr24b:100: error: 'class TVout' has no member named 'vert_res'
sketch_apr24b:101: error: 'class TVout' has no member named 'horz_res'
sketch_apr24b:107: error: 'class TVout' has no member named 'vert_res'
sketch_apr24b:114: error: 'class TVout' has no member named 'horz_res'
sketch_apr24b:115: error: 'class TVout' has no member named 'horz_res'
sketch_apr24b:118: error: 'class TVout' has no member named 'vert_res'
sketch_apr24b:119: error: 'class TVout' has no member named 'horz_res'
sketch_apr24b:119: error: 'class TVout' has no member named 'horz_res'
sketch_apr24b.cpp: In function 'void drawMenu()':
sketch_apr24b:145: error: '_8X8' was not declared in this scope
sketch_apr24b:146: error: 'class TVout' has no member named 'print_str'
sketch_apr24b:148: error: '_5X7' was not declared in this scope
sketch_apr24b:149: error: 'class TVout' has no member named 'print_str'
sketch_apr24b:150: error: 'class TVout' has no member named 'print_str'
sketch_apr24b:151: error: 'class TVout' has no member named 'print_str'
sketch_apr24b:152: error: 'class TVout' has no member named 'print_str'
sketch_apr24b:157: error: 'class TVout' has no member named 'horz_res'
sketch_apr24b:158: error: 'class TVout' has no member named 'vert_res'
sketch_apr24b.cpp: In function 'void setup()':
sketch_apr24b:186: error: 'class TVout' has no member named 'start_render'
sketch_apr24b:188: error: 'class TVout' has no member named 'horz_res'
sketch_apr24b:189: error: 'class TVout' has no member named 'vert_res'
sketch_apr24b.cpp: In function 'void loop()':
sketch_apr24b:203: error: 'class TVout' has no member named 'vert_res'
sketch_apr24b:208: error: 'class TVout' has no member named 'horz_res'
sketch_apr24b:220: error: 'class TVout' has no member named 'horz_res'
sketch_apr24b:230: error: '_8X8' was not declared in this scope
sketch_apr24b:231: error: 'class TVout' has no member named 'print_str'
sketch_apr24b:232: error: 'class TVout' has no member named 'print_str'
sketch_apr24b:237: error: '_5X7' was not declared in this scope

Any help would be appreciated, Thank you for sharing this with everyone!

far.peter (author)Nicky_G2011-04-24

I had that same error, this game requires a version of TVOut before beta 1, i copied my arduino ide folder to another location and put the older library in it, so i can choose witch one to use

Nicky_G (author)far.peter2011-04-27

Thanks I got it to work! Now I'm going to try to modify the new code for the Wayne and Layne Pong for the Atari controller.

far.peter (author)Nicky_G2011-04-27

I tried using the Atari paddles, but they never worked for me, mabey i didnt have the right pin-outs.

duboisvb (author)2011-03-16

Kyle,
I have just published an Instructable of my version of the Ardu Pong. Thanks. I hope I gave you the proper credit.

mcaliber.50 (author)2011-01-20

is arduino a game system? i have heard about a lot of hacks using it, and was very confused.

read all about it here :
http://www.arduino.cc/
its called a microcontroller, essentially its like a small computer on a chip that you can program the pins of that chip to do whatever you want them to do

kyle brinkerhoff (author)2010-12-03

on the old version, no problem, just tie in another db9 connector to the arduino and assign the other controller to the correct pin(you decide that part) .

duboisvb (author)2010-11-22

Hello,
I am hoping you can help me. I have put this project together but I can not get it to work properly. I am new to Arduino and electronics in general but io am learning. It loads the screen but the joystick does not respond. Nor does thje button. I have tried a different Arduino but with no success. I bet it is something simple and I hope the pictures show what i have done wrong.

Thanks for any help

hey this is great for a beginner, but i think i may know what your problem is, depending on the age of the controller itself some of the button pads on the internal circuit board could be failing, to check this , unscrew all the screws marked in the image, then check the circuit board to see if all the buttons are in place with thier contactors still in the correct position(see 2nd image) and also check that the wires are all correctly plugged into the board. also if you happen to have all the original atari gear, go get the pong paddles out for this and download pete lamonicas code here: http://www.flickr.com/photos/29973568@N07/4822416805/in/photostream/

then connect the pin 9 on the serial port to anolog in 0, and then connect the serial ports pin 7 to the arduino's 5v pin, and then connect the serial ports pin 8 to the arduino's gnd pin. this will work alot better if you happen to have the actual pong paddles

i hope that helps out, but for your current problem, all you can do is just double check and check again for your wiring, but best of luck! let me know if you need any more help

Thanks for the help. I do have the paddles and will try them. I copied and pasted the code from your link and it will not verify. I wonder if it is all there as I do not see a loop function and it fails in the draw net function which seems very differenty than yours. But again I am new to this

huh thats weird i guess when pete modded the code for a creative commons license, he fudged the code. ill see if i can hunt down a version that still works correctly,

k, talked to pete last night, he says that flickr has problems with formatting and he says that he's now included a link to a download site that works far better:
http://pastebin.com/AC2Gfn6X

Thanks for your help. I am actually relieved to find that there was something amiss. Maybe I am starting to understand this a bit. :) Thanks again.

no prob, good to know when mistakes get made, and then they get fixed:]

lloydrmc (author)2010-11-07

I do like your project. I'm glad you found paddles. Now, I presume you can make a two player game? Paddles were cool - you could put english on the ball by moving the paddle across the ball as you contacted it.

sorry say that again? i dont know what you mean by " put english on the ball by moving the paddle across the ball as you contacted it"

Klone38 (author)kyle brinkerhoff2010-11-20

The term "to put english" just means to put some angle or spin on the ball if you hit it right with the paddles. which means that if you move the paddle sharply at the time the ball hits the paddle you can make the ball have some spin or fly away in a less obvious angle.

kyle brinkerhoff (author)Klone382010-11-20

ok, thanks for the clarification, ive never heard that term before, i live in utah so people use clear and concise words and rarely use anything like that but yea ive been thinking about that but ive never really bothered with it because it means you have to constantly calculate multiple velocitys and the original auther of the code wrote it so that anything that would have to deal withe the comparison of the previous position to the current position of the players paddle would be rather difficult

I'm from Maryland, and live in Colorado, and we use the King's English here. And the term "english" is both.

Klone is right. Have you played ping pong? You can make the ball curve quite a bit by flipping the paddle in a certain way as the ball contacts it.

kyle brinkerhoff (author)2010-11-18

hey everyone check out the update i added on step 8

octopuscabbage (author)2010-11-06

Is this the programming in c? Would you be interested in a community program to make an option for other types of pong?

hey thier!
actually this is based in a language called processing, it has a large number of simalaritys to c, in a matter of fact quite a few peices of code in processing can actually run in c as they are, but yea id'e love to help out making this available to other people :]

btw wich flavor of c? c#, devc++....

Oh i was just asking for general c, I only know a small bit of c++ (Im a python guy) And we could make a special instructables edition

ok i can make that happen, so what would we be looking at? a pc or other micro controller?

What do you mean?

what is the platform that i would be developing for?

About This Instructable

75,219views

122favorites

License:

Bio: hi i enjoy making ludicrisly over the top and complex devices.... Being an ameture engineer, I refuse pick the easy option, but rather the one ... More »
More by kyle brinkerhoff:I built a BS detector samsung charge dock the one seam wallet
Add instructable to: