3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

2 player Pong using Arduino

2 player Pong using Arduino
I started with the Instructable from Kyle Brinckerhoff;

http://www.instructables.com/id/Ardu-pong-the-Arduino-based-pong-console/

 
Thanks Kyle!

and the following at Make magazine
http://blog.makezine.com/archive/2007/08/arduino-pong.html

and I see the original code is attributed to Pete Lamonica

Thanks Pete!!

I am using the paddles instead of the joy stick and I have made it for 2 players. Also I added some sound.

I put the electronics in an Iphone box .
 
Remove these adsRemove these ads by Signing Up
 

Step 1Video of the game

 
« Previous StepDownload PDFView All StepsNext Step »
23 comments
Feb 25, 2012. 1:57 PMThe nerdling says:
can yo make it single player?
Feb 26, 2012. 5:08 PMThe nerdling says:
cool thanks :)
Feb 3, 2012. 4:45 PMDavid97 says:
Is there a way to make the controllers from pots?
Feb 11, 2012. 2:44 PMDavid97 says:
Thanks, so I coonnect the center of the pot to analog in and the two outer two to GND and 5V?
Feb 24, 2012. 3:33 PMThe nerdling says:
that should work, but i would try first with 3v out just in case
May 24, 2011. 9:04 PMThe nerdling says:
pong is the best whoooooooooooooooooooooooooooooooooo!!!!!!!!!!!!!!!!!!!
Apr 7, 2011. 5:19 AMjoschka says:
i have a question from where did you get the TV out H file
i mean the librarie you include in the beginning of the code
thx great project
Mar 30, 2011. 3:57 PMstivheys says:
hi id like to say great instructable! i got my first arduino today and have made this one problem im having is i get an load of errors while trying to compile, im quiet new to this so maybe nothing much these are the erros im getting i would be very greatful for your advice thanks in advance.


C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:27: error: prototype for 'void TVout::select_font(const unsigned char*)' does not match any in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\/TVout.h:103: error: candidate is: void TVout::select_font(uint8_t)
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:35: error: prototype for 'void TVout::print_char(uint8_t, uint8_t, unsigned char)' does not match any in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\/TVout.h:104: error: candidate is: void TVout::print_char(uint8_t, uint8_t, char)
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:41: error: no 'void TVout::inc_txtline()' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:49: error: no 'void TVout::write(const char*)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:56: error: no 'void TVout::write(const uint8_t*, uint8_t)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:62: error: no 'void TVout::write(uint8_t)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:92: error: no 'void TVout::print(const char*)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:97: error: no 'void TVout::print(char, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:102: error: no 'void TVout::print(unsigned char, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:107: error: no 'void TVout::print(int, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:112: error: no 'void TVout::print(unsigned int, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:117: error: no 'void TVout::print(long int, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:132: error: no 'void TVout::print(long unsigned int, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:138: error: no 'void TVout::print(double, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:143: error: no 'void TVout::println()' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:149: error: no 'void TVout::println(const char*)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:155: error: no 'void TVout::println(char, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:161: error: no 'void TVout::println(unsigned char, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:167: error: no 'void TVout::println(int, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:173: error: no 'void TVout::println(unsigned int, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:179: error: no 'void TVout::println(long int, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:185: error: no 'void TVout::println(long unsigned int, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:191: error: no 'void TVout::println(double, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:197: error: no 'void TVout::printPGM(const char*)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:205: error: no 'void TVout::printPGM(uint8_t, uint8_t, const char*)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:215: error: no 'void TVout::set_cursor(uint8_t, uint8_t)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:220: error: no 'void TVout::print(uint8_t, uint8_t, const char*)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:226: error: no 'void TVout::print(uint8_t, uint8_t, char, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:231: error: no 'void TVout::print(uint8_t, uint8_t, unsigned char, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:236: error: no 'void TVout::print(uint8_t, uint8_t, int, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:241: error: no 'void TVout::print(uint8_t, uint8_t, unsigned int, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:246: error: no 'void TVout::print(uint8_t, uint8_t, long int, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:251: error: no 'void TVout::print(uint8_t, uint8_t, long unsigned int, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:256: error: no 'void TVout::print(uint8_t, uint8_t, double, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:262: error: no 'void TVout::println(uint8_t, uint8_t, const char*)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:270: error: no 'void TVout::println(uint8_t, uint8_t, char, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:278: error: no 'void TVout::println(uint8_t, uint8_t, unsigned char, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:286: error: no 'void TVout::println(uint8_t, uint8_t, int, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:294: error: no 'void TVout::println(uint8_t, uint8_t, unsigned int, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:302: error: no 'void TVout::println(uint8_t, uint8_t, long int, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:310: error: no 'void TVout::println(uint8_t, uint8_t, long unsigned int, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:318: error: no 'void TVout::println(uint8_t, uint8_t, double, int)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:326: error: no 'void TVout::printNumber(long unsigned int, uint8_t)' member function declared in class 'TVout'
C:\Users\stiv\Desktop\arduino-0022\libraries\TVout\TVoutPrint.cpp:347: error: no 'void TVout::printFloat(double, uint8_t)' member function declared in class 'TVout'
Mar 30, 2011. 6:44 PMstivheys says:
ok so before i was using arduino 0022 if i put the code into 0021 then i only get these error codes


sketch_mar31a.cpp:10:21: error: TVout.h: No such file or directory
sketch_mar31a:38: error: 'TVout' does not name a type
sketch_mar31a.cpp: In function 'void drawGameScreen()':
sketch_mar31a:90: error: 'TV' was not declared in this scope
sketch_mar31a.cpp: In function 'void drawBox()':
sketch_mar31a:132: error: 'TV' was not declared in this scope
sketch_mar31a.cpp: In function 'void drawMenu()':
sketch_mar31a:154: error: 'TV' was not declared in this scope
sketch_mar31a:155: error: '_8X8' was not declared in this scope
sketch_mar31a:157: error: '_5X7' was not declared in this scope
sketch_mar31a.cpp: In function 'void setup()':
sketch_mar31a:198: error: 'TV' was not declared in this scope
sketch_mar31a:198: error: '_NTSC' was not declared in this scope
sketch_mar31a.cpp: In function 'void loop()':
sketch_mar31a:225: error: 'TV' was not declared in this scope
sketch_mar31a:236: error: 'TV' was not declared in this scope
sketch_mar31a:240: error: 'TV' was not declared in this scope
sketch_mar31a:256: error: 'TV' was not declared in this scope
sketch_mar31a:258: error: 'TV' was not declared in this scope
sketch_mar31a:274: error: 'TV' was not declared in this scope
sketch_mar31a:274: error: '_8X8' was not declared in this scope
sketch_mar31a:281: error: '_5X7' was not declared in this scope
sketch_mar31a:289: error: 'TV' was not declared in this scope

hmmm im struggling here all part of the learning curve i guess :-)
Mar 31, 2011. 7:46 AMstivheys says:
thank you for your help i got it to compile using an older version of tvout and the 0021 when connected to the tv and running i only get a white screen that flickers with black lines cud this be because im using pal tv or could there be something wrong with my wiring? i no im so close to it running right lol ;-)
Feb 24, 2012. 3:52 PMThe nerdling says:
when you go into the compiler and paste the code in, you should scroll down until you se a blue (_NTSC) then change it to (_PAL)
hope this works :), worked for me, but the image was slightly on an angle and scrolling downn :(
trying to fix it
Feb 24, 2012. 3:53 PMThe nerdling says:
the code is for NTSC you need to chande it.
see my comment above for details
Mar 18, 2011. 2:05 PMthewizard42 says:
To make things faster ball wise, would i increase the max y velocity in the code?
Mar 19, 2011. 10:31 AMthewizard42 says:
Thanks. I'll see what i can do.
Mar 17, 2011. 3:17 PMzazenergy says:
Love it

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
22
Followers
24
Author:duboisvb
Retired Math teacher who needs a hobby! So I tinker with stuff: Arduino, welding, my 1958 TR-3 , my tennis serve