ESP32 Tilt Arcade Console

Published: July 27, 2026

This project takes my earlier Arduino Nano tilt consoles and rebuilds them around an ESP32. The extra memory and processing power made it possible to combine four games, a particle fluid simulator, and an animated robot face in one compact OLED system.

The console is controlled by tilting an MPU-6500 motion sensor. One push button handles the menu and in-game actions, while a passive buzzer provides sound feedback.


📸 Preview

ESP32 Tilt Arcade Console assembled on breadboards with the Tilt Arcade menu displayed on its OLED screen

⚙️ How It Works


🎮 Games and Modes

ModeDescription
Tilt MazeGuide a ball through maze walls and reach the goal.
Coin CollectorCollect coins against a timer and try to beat the saved high score.
Tilt SnakeControl a growing snake, collect blinking food, and avoid collisions.
Space DodgerMove a spaceship left and right while avoiding falling asteroids.
Fluid SimTilt the console to change gravity and move 120 simulated particles.
Vector FaceInteract with an animated face featuring gaze, expressions, blinking, and a shake-to-dizzy reaction.

🧰 Components Used

ComponentPurpose
ESP32 Dev ModuleRuns the console and all six modes
128×64 I2C OLED displayDisplays the menu, games, simulation, and robot face
MPU-6500-family IMUMeasures tilt and motion
Push buttonControls menu navigation and mode actions
Passive buzzerProvides sound feedback
Breadboard and jumper wiresConnect the prototype
USB cable or power bankPowers and programs the ESP32

🔌 Wiring Instructions

OLED Display

OLED PinESP32 Pin
GNDGND
VCC3V3
SDAGPIO21
SCLGPIO22

MPU-6500 Motion Sensor

IMU PinESP32 Pin
GNDGND
VCC3V3
SDAGPIO21
SCLGPIO22

Push Button and Buzzer

ComponentConnection
Button leg 1GPIO18
Button leg 2GND
Buzzer positiveGPIO25
Buzzer negativeGND

The button uses INPUT_PULLUP, so it reads LOW when pressed. The tested IMU was mounted with its X arrow facing upward and its Y arrow facing left.


📦 Libraries

LibraryPurpose
Adafruit SSD1306Controls the OLED display
Adafruit GFX LibraryProvides graphics and drawing functions
WireProvides I2C communication
EEPROMStores calibration values and high scores

🚀 Building and Uploading

  1. Install PlatformIO in VS Code.
  2. Clone or download the project repository.
  3. Open the repository folder in VS Code.
  4. Connect the ESP32 by USB.
  5. Build the project with PlatformIO.
  6. Select the detected serial port and upload the firmware.
  7. Hold the console in a comfortable position and recalibrate each mode if needed.
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
lib_deps =
  adafruit/Adafruit SSD1306
  adafruit/Adafruit GFX Library

🧾 Selected Code

The full firmware is available on GitHub. This selected snippet shows how the six modes are registered in the menu.

constexpr uint8_t GAME_MAZE = 0;
constexpr uint8_t GAME_COIN = 1;
constexpr uint8_t GAME_SNAKE = 2;
constexpr uint8_t GAME_DODGER = 3;
constexpr uint8_t GAME_FLUID = 4;
constexpr uint8_t GAME_FACE = 5;
constexpr uint8_t GAME_COUNT = 6;

const char *const GAME_NAMES[GAME_COUNT] = {
    "Tilt Maze",
    "Coin Collector",
    "Tilt Snake",
    "Space Dodger",
    "Fluid Sim",
    "Vector Face",
};

View the complete ESP32 project on GitHub


📝 Notes

← Back to Projects