Wiring
Check pinout, power supply, common GND and voltage levels before connecting the module.
Full code
#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.setTextColor(SSD1306_WHITE);
display.setTextSize(2);
display.setCursor(0, 10);
display.println("ESP32");
display.display();
}
void loop() {}How it works
This lesson matches the page title and gives a clean starting point for this exact example.
Common mistakes
Check board selection, wiring, libraries, power supply and serial monitor baud rate.