// 22 animations found
>
happy_face
[→]
// by 0x1306 · 4 frames · 100ms
// views · runs
sad_face
[→]
// by 0x1306 · 4 frames · 200ms
// views · runs
progress_bar
[→]
// by 0x1306 · 8 frames · 125ms
// views · runs
diya_flame
[→]
// by 0x1306 · 6 frames · 83ms
// views · runs
cricket_bat
[→]
// by 0x1306 · 8 frames · 83ms
// views · runs
auto_rickshaw
[→]
// by 0x1306 · 6 frames · 100ms
// views · runs
train_moving
[→]
// by 0x1306 · 8 frames · 67ms
// views · runs
diwali_burst
[→]
// by 0x1306 · 8 frames · 83ms
// views · runs
flag_wave
[→]
// by 0x1306 · 6 frames · 100ms
// views · runs
eyes_default
[→]
// by 0x1306 · rounded_rect · 100ms
// views · runs
eyes_happy
[→]
// by 0x1306 · rounded_rect · 100ms
// views · runs
eyes_angry
[→]
// by 0x1306 · rounded_rect · 100ms
// views · runs
eyes_sleepy
[→]
// by 0x1306 · rounded_rect · 125ms
// views · runs
eyes_suspicious
[→]
// by 0x1306 · rounded_rect · 100ms
// views · runs
eyes_wide
[→]
// by 0x1306 · rounded_rect · 100ms
// views · runs
eyes_look_right
[→]
// by 0x1306 · rounded_rect · 125ms
// views · runs
eyes_look_left
[→]
// by 0x1306 · rounded_rect · 125ms
// views · runs
eyes_doughnut
[→]
// by 0x1306 · rounded_rect · 125ms
// views · runs
eyes_pill_tall
[→]
// by 0x1306 · rounded_rect · 125ms
// views · runs
eyes_pill_wide
[→]
// by 0x1306 · rounded_rect · 125ms
// views · runs
eyes_mini
[→]
// by 0x1306 · rounded_rect · 167ms
// views · runs
eyes_glitch
[→]
// by 0x1306 · rounded_rect · 83ms
// views · runs
// preview
frame_00 / 04// 100ms per frame
// space: play/pause · ←→: step frames
// run_on_device · setup required
[▼]
flash micropython firmware to your esp32
[↓ download micropython]
// one-time setup · takes ~2 min
upload ssd1306.py to your board
// place in /lib folder on your esp32
wire your oled display
SDA → GPIO21 · SCL → GPIO22
VCC → 3.3V · GND → GND
// arduino_c++ tab works without any of this
// copy code → arduino ide → upload directly
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
#include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> // 0x1306.dev · animation: happy_face · 4 frames · 100ms #define SCREEN_WIDTH 128 #define SCREEN_HEIGHT 64 #define OLED_RESET -1 #define SCREEN_ADDRESS 0x3C Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); #define FRAME_COUNT 4 #define FRAME_DELAY 100 void drawFrame(int frame) { display.clearDisplay(); int cx = 64; int cy = 32; // --- face outlines --- display.drawCircle(cx, cy, 26, WHITE); // --- eyes --- draw AFTER face, BEFORE smile mask --- if (frame == 3) { // blink display.drawFastHLine(cx - 13, cy - 8, 9, WHITE); display.drawFastHLine(cx + 4, cy - 8, 9, WHITE); } else { // open display.fillRect(cx - 13, cy - 11, 6, 6, WHITE); display.fillRect(cx + 7, cy - 11, 6, 6, WHITE); } // --- smile --- bottom arc 200 to 340 degrees --- for (int a = 200; a < 340; a += 8) { float rad = a * 0.0174533; int x = cx + 15 * cos(rad); int y = cy + 15 * sin(rad); display.drawPixel(x, y, WHITE); } display.display(); } void setup() { Wire.begin(21, 22); // SDA=21, SCL=22 for ESP32 DevKit // change to 0x3D if display not found display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS); display.clearDisplay(); display.display(); } void loop() { for (int i = 0; i < FRAME_COUNT; i++) { drawFrame(i); delay(FRAME_DELAY); } }