Raspberry Pi and Arduino Power Custom Pinball Table
He's a pi-nball wizard
You wait ages for a Raspberry Pi retrogaming build, and then loads come along at once. This pinball table was built by software engineer Chris Dalke, and came to us via Hackaday. It uses a Raspberry Pi 4 in concert with an Arduino Uno but the Arduino could easily be swapped for a Raspberry Pi Pico.
The project was born out of Dalke’s fascination with arcade machine interfaces - the “rich multi-sensory experience” you’re bombarded with to try and catch your attention against the similarly distracting environment.
While the game itself runs in software, it was important to Dalke that the ‘feel’ was right, so the flippers are controlled using long-throw arcade buttons with a ‘clicky’ response, with the option of haptic feedback via a solenoid. The casing was built using laser-cut plywood, which slots together using friction to minimize the number of visible screws but can still be easily opened. The raw appearance of the project belies the tech that it encloses.
The all-important high-score tables are displayed on four Adafruit LED matrix panels controlled by the Arduino over an I2C connection. The orange glow of the panels influenced the look of the project elsewhere. The Arduino also handles the button inputs, communicating via USB link (most likely serial / UART) with the Raspberry Pi, which runs the game using a seven inch LCD display.
The pinball game itself is a custom one coded in C++ and OpenGL. There's lots of detail on this on Dalke’s GitHub page, including build scripts, an input subsystem, and graphics. The libraries raylib and raygui were used, while SQLLite3 handles writing high scores to disk. The game contains several powerups, high scores, and is optimized to run at 60fps.
A single 5V power supply provides juice to the Pi, stereo speakers, and LED matrices, while the Arduino gets what it needs from its USB connection to the Pi. The touchscreen connects to the Pi over HDMI, with a USB connection too, handling the touch inputs as well as providing power.
Stay On the Cutting Edge: Get the Tom's Hardware Newsletter
Get Tom's Hardware's best news and in-depth reviews, straight to your inbox.
Ian Evenden is a UK-based news writer for Tom’s Hardware US. He’ll write about anything, but stories about Raspberry Pi and DIY robots seem to find their way to him.