Portable ESP32-S3 companion with tilt-driven impulse physics, a match-3 ball game, and IMU-animated eyes.
https://youtube.com/shorts/vLsGOB6HffI
Repository: https://github.com/intellar/ImpulsePlay
git clone https://github.com/intellar/ImpulsePlay.gitBlog: intellar.ca — related projects: Animated eye OLED, Intellar Engine.
- Ball mode — up to 12 balls, gravity and inertia from a BMI160 IMU, touch grab/throw, color matching, explosive bombs, high score on LittleFS
- impulse_physics — fixed-timestep 2D impulse collisions, wall bounces, squash & stretch on impact
- Eyes mode — cartoon eyes with tilt, squash, blink, and idle animations (experimental; on-screen mode toggle is disabled in firmware)
- UI — battery voltage, FPS overlay, in-game menu
| Component | Notes |
|---|---|
| MCU | ESP32-S3 Super Mini (4 MB flash, PSRAM) |
| Display | ILI9341 240×320, SPI + XPT2046 touch |
| IMU | BMI160 on I2C |
| Power | LiPo with voltage divider on ADC |
| GPIO | Function |
|---|---|
| 11 | TFT MOSI |
| 12 | TFT SCLK |
| 13 | TFT MISO |
| 9 | TFT DC |
| 8 | TFT RST |
| 5 | TFT CS |
| 4 | Backlight |
| 1 | Touch CS |
| 6 | IMU SDA |
| 7 | IMU SCL |
| 2 | Battery ADC (divider ×2) |
Pins are defined in Firmware/platformio.ini via TFT_eSPI build flags.
Source enclosure: CAD/Case_v0.FCStd (FreeCAD). Slicer outputs (*.gcode, *.3mf, Fusion backups *.FCBak) are gitignored.
Requires PlatformIO.
pio run -d Firmware
pio run -d Firmware -t uploadSerial monitor (115200 baud):
pio device monitor -b 115200 -d FirmwareOptional upload port:
pio run -d Firmware -t upload --upload-port COMxEnvironment: esp32-s3-supermini-n4r2
- Touch empty space to spawn a ball; touch a ball to drag it
- Quick release to throw; drag to the top-left 50×50 px zone to delete
- Match 3+ same-color touching balls to score
- ~10% of new balls are explosive (white); tap to arm, 2 s fuse
- 15 s patience timer — make a match before game over
- Menu (gear, top-right): Game vs Simulation mode, reset high score
ImpulsePlay/
├── Firmware/
│ ├── platformio.ini
│ ├── include/ # Headers (physics_engine, ball/eyes animation, …)
│ ├── src/ # Application source
│ └── test/ # Host unit tests for physics_engine
├── CAD/ # Enclosure source (FreeCAD)
├── LICENSE # MIT
└── README.md
pio test -d Firmware -e nativeIf no native environment is configured, compile the test file on a desktop toolchain:
g++ -std=c++17 -I Firmware/include Firmware/test/physics_engine_collision_test.cpp -lm -o physics_test && ./physics_testMIT — see LICENSE.
