SSD1306 + ESP32: Hello Screen in 10 Minutes

SSD1306 · esp32 / arduino · 2026-11-19

What you need

Wiring

OLED pin ESP32
VCC 3V3
GND GND
SCL GPIO 22
SDA GPIO 21

Code

Install Adafruit SSD1306 and Adafruit GFX from the Arduino Library Manager, then flash:

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

Adafruit_SSD1306 display(128, 64, &Wire, -1);

void setup() {
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
  display.clearDisplay();
  display.setTextSize(1);
  display.setTextColor(SSD1306_WHITE);
  display.setCursor(0, 0);
  display.println("Hello, DooMaker!");
  display.display();
}

void loop() {}

Power it up and your first line is on the glass — that’s the whole tutorial.

Common pitfalls

← All tutorials

Pairs well with