Module 2 • Visual HUD ESP32-S3 Super-Kit Zero-Library C++

Session 7: 0.96" I2C OLED Animated Robot Eyes & Telemetry HUD

Pure Wire.h I2C animated robot eyes (Blink, Happy, Look) + shared MPU-6050 artificial horizon!

← Course Book 🏫 Satpuda Lab
Connect Robo Logo Connect Robo Kit

⚡ 4-Step Visual System Flow

No Text Walls • 1-Glance Architecture
Step 1 👁️
Robot Eyes / Horizon
Graphic Framebuffer

Selects Happy Eye, Angry Eye, or Gyro Horizon mode.

Step 2 🧠
Pure Wire.h I2C
1024-Byte Framebuffer

Zero heavy external libraries; writes raw byte buffers directly.

Step 3 ⚡
400kHz I2C Burst
SSD1306 Controller

High-speed hardware clock pushes full frame in 20ms.

Step 4 ✨
128x64 OLED Glow
8192 Blue/Yellow Pixels

Crisp pixel-art robot eyes blink and follow tilt in real-time!

1

🧰 Components & Shared I2C Bus (Same 2 Wires!)

ESP32-S3
ESP32-S3 SDA=8, SCL=9
0.96
0.96" I2C OLED I2C Addr 0x3C
MPU-6050 IMU
MPU-6050 IMU I2C Addr 0x68
Breadboard
Breadboard Shared 3.3V & GND
2

👀 Live 128×64 OLED Preview & Pinout

OLED VCC
Red Jumper Wire to 3.3V Power Rail
3.3V Power
OLED GND
Black Jumper Wire to Common Ground
GND
OLED SDA (I2C Data)
Yellow Jumper Wire from OLED SDA to ESP32
GPIO 8
OLED SCL (I2C Clock)
Green Jumper Wire from OLED SCL to ESP32
GPIO 9
3

⚡ Zero-Library Verified Codes (Click "⚡ Open in IDE")

step1_i2c_scanner.ino ESP32-S3 31 lines
/*
 * Session 7 - Step 1: Shared I2C Bus Scanner (Detect OLED 0x3C + MPU-6050 0x68!)
 * Wiring: BOTH OLED & MPU-6050 connect to SDA -> GPIO 8, SCL -> GPIO 9, VCC -> 3.3V, GND -> GND
 */
#include <Wire.h>

void setup() {
  Serial.begin(115200);
Preview (8 of 31 lines) — Click ⚡ Open in IDE to auto-load code & board!
✅ Output: Lists both 0x3C (OLED) and 0x68 (MPU-6050) sharing GPIO 8 & 9!
step2_oled_robot_eyes.ino ESP32-S3 79 lines
/*
 * Session 7 - Step 2: Expressive Animated Robot Eyes on 0.96" OLED (ZERO External Libraries!)
 * Uses only built-in Wire.h on SDA=GPIO 8, SCL=GPIO 9 (Address 0x3C).
 */
#include <Wire.h>

#define OLED_ADDR 0x3C
uint8_t fb[1024]; // 128 x 64 / 8 = 1024 bytes screen memory
Preview (8 of 79 lines) — Click ⚡ Open in IDE to auto-load code & board!
✅ Output: Cute rounded blinking, left/right & happy robot eyes — ZERO extra libraries!
step3_oled_drone_horizon.ino ESP32-S3 62 lines
/*
 * Session 7 - Step 3: Live Drone Artificial Horizon on OLED + MPU-6050 (Shared I2C Bus!)
 * Tilt the ESP32-S3 board Left/Right -> Watch the live flight horizon tilt on OLED!
 */
#include <Wire.h>

#define OLED_ADDR 0x3C
#define MPU_ADDR  0x68
Preview (8 of 62 lines) — Click ⚡ Open in IDE to auto-load code & board!
✅ Output: Tilt ESP32-S3 board ➔ live fighter-jet artificial horizon tilts on OLED!
📥 33 Sketches (.ZIP) ← Session 6: 2WD Obstacle Rover Session 8: Jarvis Voice AI Bot →