Pico Pong!
Play gesture-controlled Pong with a Raspberry Pi Pico!
How It Works
A Raspberry Pi Pico generates a 640x480@60Hz monochrome VGA signal. Due to memory constraints, the usable screen size is 640x350. I would like to say that I chose monochrome because it has the proper retro look for Pong, but actually I just got tired of struggling to fit a cycle-perfect VGA generator into the tiny 32-instruction deep PIO instruction memory and had no will left to squeeze in color.
Data for the display is stored in a buffer in RAM, which the PIO program grabs at exactly the right nanosecond as it paints the screen via DMA. This leaves the CPU free to do other work, like play a game, while the PIO handles the cycle-intensive process of generating a VGA signal. The CPU simply needs to update the appropriate memory locations as needed to change the video output.
Fortunately the Raspberry Pi Pico is known for its ability to be overclocked. I had to run it at over 258 MHz to get everything working correctly—not bad for a board rated at 133 MHz.
The player paddle is controlled by two infrared (IR) LED / IR phototransistor pairs. The IR LED shines upward onto a mirror (held in place by a QuadHands), which reflects the IR light back onto the receiver. When that signal is interrupted (i.e. by a hand), it triggers the Pico via GPIO to move the player paddle. One receiver moves the paddle up on the screen, and the other moves the paddle down. I was surprised by how smooth and natural an interface this ended up being for Pong; much nicer than a potentiometer. It feels a bit like playing a Wii game, if the Wii came out in the 1980s. The paddle on the left side of the screen is computer controlled.
Media
YouTube:
Playing Pong:
The gesture controller:
The Pico and VGA breakout board:
Schematic:
Bill of Materials
1 x Raspberry Pi Pico
2 x 940nm IR phototransistors
2 x 940nm IR LEDs
1 x VGA breakout adapter
3 x 100 ohm resistors
3 x 387 ohm resistors
2 x 10 ohm resistors
2 x 10K ohm resistors
2 x Breadboards
Small disc mirrors
Miscellaneous wire
Pico Pong!

Raspberry Pi 5 7 Inch Touch Screen IPS 1024x600 HD LCD HDMI-compatible Display for RPI 4B 3B+ OPI 5 AIDA64 PC Secondary Screen(Without Speaker)
BUY NOW
ESP32-S3 4.3inch Capacitive Touch Display Development Board, 800×480, 5-point Touch, 32-bit LX7 Dual-core Processor
BUY NOW
Raspberry Pi 5 7 Inch Touch Screen IPS 1024x600 HD LCD HDMI-compatible Display for RPI 4B 3B+ OPI 5 AIDA64 PC Secondary Screen(Without Speaker)
BUY NOW- Comments(0)
- Likes(4)

-
Engineer Sep 29,2024
-
Engineer Dec 11,2023
-
T Wright Oct 24,2021
-
(DIY) C64iSTANBUL May 20,2021
- 1 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10

-
10design
-
10usability
-
10creativity
-
10content
More by Engineer
-
-
-
-
Modifying a Hotplate to a Reflow Solder Station
1014 1 6 -
MPL3115A2 Barometric Pressure, Altitude, and Temperature Sensor
546 0 1 -
-
Nintendo 64DD Replacement Shell
452 0 2 -
V2 Commodore AMIGA USB-C Power Sink Delivery High Efficiency Supply Triple Output 5V ±12V OLED display ATARI compatible shark 100W
1288 4 2 -
How to measure weight with Load Cell and HX711
769 0 3