ESP32 Animation
C++ firmware that decodes binary-encoded GIF frames and drives a 128×64 OLED at smooth framerates — squeezed onto tightly limited hardware.
Firmware written in C++ for efficient performance
U8g2 library rendering binary-encoded GIFs on a 128×64 OLED
Resources optimized for smooth playback on limited hardware
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.
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.
The ESP32 connects to the SSD1306 OLED over I2C using just four wires: VCC, GND, SDA, and SCL.
Datasheet
Project specifications