How to Create SSD1306 OLED Animations for Arduino
The SSD1306 is the most common controller on cheap 0.96" OLED modules. If you want Arduino OLED animations — loaders, icons, weather graphics, or custom pixel art — you need multiple frames stored as bitmap data and a playback loop. This guide walks through the full workflow, plus a faster way using a free OLED animation maker.
What you need
- Arduino Uno, Nano, Mega, ESP32, or ESP8266
- 128×64 (or 128×32) I²C OLED with SSD1306 chip
- Adafruit SSD1306 + GFX libraries (or U8g2)
- Jumper wires — SDA, SCL, VCC, GND
Step 1: Wire the OLED (I²C)
On Arduino Uno/Nano: SDA → A4, SCL → A5, VCC → 5V, GND → GND.
ESP32 often uses GPIO 21/22. Most modules use address 0x3C (some use 0x3D).
New to wiring? Start with our Arduino OLED display tutorial.
Adafruit SSD1306 vs U8g2 for animations
Adafruit SSD1306 animation code uses drawBitmap() from GFX — familiar if you followed
any adafruit ssd1306 tutorial. U8g2 oled animation uses
drawXBMP() and is popular on ESP32 projects. Both work; pick one library and stick with it for the project.
Step 2: Understand how OLED animations work
An animation is a sequence of monochrome bitmaps. Each frame is a 1-bit image (on/off pixels) packed into a
PROGMEM byte array. Your sketch clears the display, draws one frame with
drawBitmap(), calls display(), waits a few milliseconds, then repeats for the next frame.
For a 128×64 display, one full frame is 1024 bytes (128×64÷8). Ten frames means ~10 KB of flash — fine on Uno, but plan frame count and size on smaller boards.
Step 3: Create frames
You can build frames several ways:
- Draw by hand — pixel editor, export each frame
- Import a GIF — split into frames, convert to 1-bit (see our GIF to OLED guide)
- Use templates — loaders, weather, icons from an OLED animation maker
Step 4: Export Arduino code
Manually, tools like image2cpp give one static bitmap. For multi-frame SSD1306 animation, you
also need a frame index, delay timing, and a loop() that cycles frames. A dedicated
arduino oled code generator outputs the full sketch: bitmap arrays,
setup(), and playback loop for Adafruit SSD1306 or U8g2.
Step 5: Upload and test
Open the generated .ino in Arduino IDE, select your board, upload, and watch the animation on the
physical OLED. Adjust FPS on the timeline if motion feels too fast or slow.
Tips for smooth SSD1306 animations
- Keep contrast high — thin lines disappear on 1-bit displays
- Use 10–15 FPS for UI icons; 20+ for fast loaders
- Test on real hardware — the virtual preview can differ slightly
- For ESP32, try WebSerial live preview while editing
Create SSD1306 animations online — free
100+ templates, pixel editor, GIF import, instant Arduino export.
Open OLED Animation Maker →Popular searches: ssd1306 animation arduino · progmem bitmap · drawbitmap ssd1306 · 0.96 oled animation · create animations for arduino · oled animation maker · monochrome oled bitmap