A tilt-controlled LED maze game implemented using an Arduino Nano 33 BLE Sense and an ESP32. The Arduino streams real-time accelerometer data over Bluetooth, while the ESP32 handles game logic and renders gameplay on a 32×32 RGB LED matrix. Audio was prototyped but removed due to Bluetooth timing interference. This project was developed as a final project for CS 335 - Inside the Box: How Computers Work.
Controlling the player:
IMG_2426.mov
Getting key -> Unlock door:
IMG_2427.2.mov
Reaching destination -> Win state -> Next Level:
IMG_2427.3.mov
Blinking blue walls:
IMG_2428.2.mov
Colliding with red walls -> Death state:
IMG_2429.mov
(Thank you, Sophia, for being our first ever gameplay tester 🙏)
The Arduino reads accelerometer data from its onboard IMU.
- Tilt values (X and Y axes) are scaled, dead-zoned, and sent via Bluetooth to the ESP32.
- The ESP32 updates the player's position on the LED matrix accordingly, moving the player smoothly while following collision rules.
| Tile Type | Color | Behavior |
|---|---|---|
| Standard Wall | Magenta | Solid wall; player cannot pass through |
| Death Wall | Red | Instant death on contact |
| Flashing Wall | Blue | Turns on and off, solid when on; lethal if player is standing when it turns back on |
| End Zone | Yellow | Triggers level completion / win condition |
| Key Pickup | Gold | Opens corresponding gates when collected |
The Arduino has a dedicated reset button.
- Pressing it sends a reset signal to the ESP32, returning the player to the first level and the initial position.
....Will eventually finish writing this
- Audio system was scrapped due to Bluetooth overhead, causing low sample rate playback (Sounded like haunted house music...)
- Adafruit_Protomatter is incompatible with the Nano 33 BLE Sense due to the missing
g_Adigitalpinmaparray in newer MBED OS versions