This project is a handheld ball-in-maze game console built on a custom PCB using an ESP32-S2 microcontroller. Players tilt the device to guide a ball through a maze, turning physical motion into in-game control. Haptic feedback when bumping into walls.
Compute:
ESP32-S2-SOLO2-N4 microcontroller
Sensors
IMU for tilt control (I2C)
Acuators
Coin ERM for haptic feedback, with driver IC (I2C)
Round 1.28in RGB display with 240x240 resolution (SPI)
Peripherals
USB-C for power, charging, and flashing/debugging
2 push buttons for reset, game control
Sliding power switch
Power
1000mAh Lipo battery via JST connector
ERM I2C pins were mistakenly flipped but fortunately we can just swap the GPIO assignments.
Yes the USB data lines should've been as straight/short as possible but the ESD protection IC was being a nuisance. In hindsight, power switch and usb-c placing could have been swapped,
For front side components.
USB-C and IMU had to be fixed by hand.
For back side and thru-hole components.
Who has a scraper anyways...
Maze Display:
Maze was randomly generated as a PNG on: https://www.mazegenerator.net/
PNG was converted to a bitmap
Bitmap was compressed into a C file and imported into the code
Ball Movement:
Moves according to IMU orientation measurements to mimic rolling
Cannot move beyond maze walls
Start layout earlier!!!!
How many test pads? Yes.
ESP32-S2 has buggy USB, should've just added serial converter.
Use larger passives as space permits.
3D-printed enclosure
OTA maze uploads
WiFi Multiplayer
Other Games, eg Tetris