Skip to content

Tom-Michiels/TiltBox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TiltBox

TiltBox

A handheld retro game console with tilt controls, featuring 9 games on an 8x8 LED matrix. Designed at Maakleerplek.

Bill of Materials

Component Quantity Description Link
ESP32-C3 1 Microcontroller (any ESP32-C3 dev board) Amazon
WS2812 8x8 LED Matrix 1 64 RGB LEDs in 8x8 grid Amazon
ADXL345 1 3-axis accelerometer module (I2C) Amazon
USB Charger Board 1 LiPo charging module with protection Amazon
LiPo Battery 1 3.7V lithium polymer battery Amazon
Threaded Inserts 4 M3x5x7 heat-set inserts for enclosure Amazon
M3 Screws 4 M3x6mm hex socket button head Amazon
M3 Screws 4 M3x12mm hex socket button head Amazon
Walnut Wood 1 3.2mm x 115x368mm sheet Gravierbedarf
Black PLA 1 3D printer filament for enclosure
Jumper wires 7 For connections

Wiring

WS2812 LED Matrix

WS2812 Pin ESP32-C3 Pin
VCC 5V
GND GND
DIN GPIO 10

ADXL345 Accelerometer (I2C)

ADXL345 Pin ESP32-C3 Pin
VCC 3.3V
GND GND
SDA GPIO 8
SCL GPIO 9

Build Instructions

1. 3D Printing

Print the enclosure parts in black PLA:

CAD Model

Open in Onshape

2. Laser Cutting

Cut the following from the wood and plexi.dxf file:

  • Walnut wood (3.2mm thickness): Front frame
  • Clear acrylic/plexi: Screen cover

3. Soldering

Solder the components according to the wiring diagram:

Wiring Diagram

Assembly

4. Screen Assembly

The LED matrix needs a diffuser layer to blend the individual LEDs into a smooth display:

  • Diffuser: Use a white plastic bag or similar translucent material between the LED matrix and the plexi cover
  • Optional darkening: Adding a dark PVC film (e.g. available at Lukas Creative) provides additional darkness to the screen, improving contrast

5. Final Assembly

  1. Insert the M3x5x7 threaded inserts into the 3D printed enclosure using a soldering iron
  2. Mount all electronics inside the enclosure
  3. Stack the layers: LED matrix -> diffuser -> (optional dark film) -> plexi -> walnut frame
  4. Secure with M3x6mm screws (front) and M3x12mm screws (back)

Games

Switch between games by flipping the board upside down.

1. Maze

Navigate a ball through a randomly generated maze. Tilt to move the yellow ball to the red goal. A rainbow animation plays when you win.

2. Ball Trail

A simple ball that leaves a fading trail as it moves. Tilt to control direction.

3. Glow Ball

A glowing ball with a smooth gradient effect that follows your tilt movements.

4. Snake

Classic snake game. Tilt to change direction and eat the red food to grow. Don't hit yourself!

5. Breakout

Break the colored bricks at the top with a bouncing ball. Tilt left/right to move the paddle.

6. Dodge

Avoid falling obstacles. Tilt left/right to move your player at the bottom. Score increases as obstacles pass.

7. Scroll Text

Displays scrolling text: "maakleerplek"

8. Animation

Cycles through animated patterns:

  • Spiral rainbow
  • Wave
  • Rainbow gradient

9. Tetris

Classic falling block game. Tilt left/right to move pieces, tilt forward to rotate, tilt backward for fast drop.

Building and Flashing

Requires ESP-IDF v4.3+.

# Source ESP-IDF environment
source ~/esp/esp-idf/export.sh

# Build
idf.py build

# Flash
idf.py flash

# Monitor serial output
idf.py monitor

Controls

  • Tilt: Move/control in all games
  • Flip board: Switch to next game
  • Keep level during startup: Calibrates the accelerometer

Display Format

The WS2812 LEDs use GRB color format. Pixels are addressed row by row, 0-63.

About

A handheld retro game console with tilt controls, featuring 9 games on an 8x8 LED matrix. Designed at maakleerplek

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors