HomeProjectsJourney
HomeProjectsJourney
All Projects
Microcontroller Integration

ESP32 Animation

C++ firmware that decodes binary-encoded GIF frames and drives a 128×64 OLED at smooth framerates — squeezed onto tightly limited hardware.

MCU: ESP32Display: SSD1306 128×64Bus: I2C · 4 wiresStack: C++ · U8g2
▶ demo.webm1 file
Your browser does not support the video tag.
101

Firmware written in C++ for efficient performance

202

U8g2 library rendering binary-encoded GIFs on a 128×64 OLED

303

Resources optimized for smooth playback on limited hardware

Section 01

Toolchain on Arch

The dev environment was built on Arch Linux, which meant wrestling with drivers and toolchain configuration to get reliable ESP32 compilation working end to end.

Section 02

Fitting motion onto 128×64

The biggest challenge was fitting animation onto a 128×64 pixel OLED.

Color was dropped entirely; every frame was converted to monochrome binary data and the resolution reduced to fit the ESP32's limited memory.

A custom C++/U8g2 rendering pipeline decodes the binary-encoded GIF frames and pushes them to the display at smooth framerates.

A demo posted on Instagram pulled solid views.

Section 03
Wiring

The ESP32 connects to the SSD1306 OLED over I2C using just four wires: VCC, GND, SDA, and SCL.

Datasheet

Project specifications

MCUESP32
DisplaySSD1306 128×64
BusI2C · 4 wires
StackC++ · U8g2
NextCryoCellSamsung Galaxy S21 Mod