A classic reaction toy rebuilt and rewired with Umfeld driving the logic and display renderer on low-power hardware. Fast, loud, and a prime example of hardware-meets-software embedded programming.
Project Overview
Bop-It Rewired is a custom hardware and software project built around a Raspberry Pi Zero 2 W and an SSD1351 128×128 SPI OLED display. It demonstrates how to extend Umfeld with custom graphics subsystems tailored for non-OpenGL embedded hardware.
Hardware Setup & Wiring
The project uses a Raspberry Pi Zero 2 W connected to an SSD1351 128×128 RGB OLED display over SPI:
VCC → Pin 1 (3.3V)
GND → Pin 6 (GND)
DIN → Pin 19 (GPIO10 / MOSI)
CLK → Pin 23 (GPIO11 / SCLK)
CS → Pin 24 (GPIO8 / CE0)
DC → Pin 22 (GPIO25 - Data/Command)
RST → Pin 18 (GPIO24 - Reset)
Initial hardware testing was verified using Python (luma.oled) and direct C++ SPI drivers over /dev/spidev0.0 and libgpiod.
Embedded Umfeld Pipeline
Raspberry Pi OS Integration: Built SDL3 from source on Raspberry Pi Zero 2 W.
Graphics Subsystem Adapter: Because the Pi Zero 2 W hardware exposes OpenGL ES 2.0 (while Umfeld defaults to GLES 3.0), the application was configured to use a custom lightweight renderer.
Custom SPI OLED Renderer (PGraphicsSPI):
Implemented a custom PGraphicsSPI class derived from PGraphics and a SubsystemGraphicsSPI module.
Integrated rendering directly to SPI OLED without needing an OpenGL/X11 window pipeline.
Supported drawing primitives: point(), line(), rect(), circle(), text() (via Font5x7.h), and RGB565 color sprite rendering.
Game Logic & Animation System
The application drives an interactive fly animation game state machine: