2 player Pong using Arduino
I started with the Instructable from Kyle Brinckerhoff;
and the following at Make magazine
and I see the original code is attributed to Pete Lamonica
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 .
Step 1: Video of the game
Step 2: What I used
I used the following:
Arduino – I had a Freeduino from Solarbotics that I used. The picture shows another but I am sure others would work fine.
Atari paddles – I had from an old system being stored in the basement. I see them on eBay.
An old RCA cord that was in my big box of misc cords
A 9 pin D connector that I got at Radio Shack – pn 276-1538
Also (not shown)
RCA plugs for the cable to attach to – had in my pile of broken things
2 10k ohm pull down resistors
Some misc hardware – wire, screws,small pieces of wood
Step 3: Prepare the box
I started with a small piece of wood which I cut to fit inside the box. The idea was I would secure everything to this piece and then secure the box to the wood. Holes need to be cut to fit the RCA plugs, the 9 pin connector, and for a USB cable which is needed to attach to Arduino .
I glued another small piece of wood to the larger to be used as a place to secure the Arduino.
Step 4: Electronics Part1 – the RCA plugs
Following the instructions from Kyle’s Instructable, I soldier a 1k ohm and a 330 ohm resistor to the center pin of the video out RCA jack.
I also connected the 75 ohm that is shown in the diagram . It made the picture a little less bright but much clearer and it stopped a lot of the flickering.
The RCA plug for the sound is straight forward: The center plug goes to Arduino pin 11 and the ground side goes to ground.
The bottom part of the diagram is different than what I did.
Step 5: Electronics Part2 – Connections to Arduino
Analog pin 1 – goes to paddle 1
Analog pin 2 – goes to paddle 2
Ground – used to ground the 9 pin connector, the RCA connectors
5v goes to the 5 v on the 9 pin connector
Digital pin2 – goes to the button on Paddle 1(button on paddle 2 is not used)
Digital 8 – goes to video RCA
Digital 9 – goes to video RCA
Digital 11 – goes to sound RCA
For more detail: 2 player Pong using Arduino
JLCPCB – Prototype 10 PCBs for $2 + 2 days Lead Time
China’s Largest PCB Prototype Enterprise, 300,000+ Customers & 10,000+ Online Orders Per Day
Inside a huge PCB factory: https://www.youtube.com/watch?v=_XCznQFV-Mw
This Post / Project can also be found using search terms:
- arduino pong code
- Arduino rca video