Skip to content

OLED Hello World

Render real text through Adafruit GFX into the SSD1306 framebuffer.

OLED Hello World: the matching Arduino Uno circuit rendered in Circuitera’s simulator
Matching Circuitera simulator circuit. Real firmware capture; modeled components are idealized.

Wire it up

Disconnect power before changing connections. Follow terminal names rather than wire colors.

FromToWhy it matters
SSD1306 OLED (oled1) · VCCUno · 3.3VPower connection
SSD1306 OLED (oled1) · GNDUno · GND.1Ground reference
SSD1306 OLED (oled1) · SDAUno · A4Match this terminal to the sketch
SSD1306 OLED (oled1) · SCLUno · A5Match this terminal to the sketch

The complete sketch

oled-hello.ino
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 display(128, 64, &Wire, -1);
void startDisplay() {
  if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) while (true) {}
  display.clearDisplay(); display.setTextSize(1); display.setTextColor(SSD1306_WHITE);
}
void setup() {
  startDisplay(); display.setCursor(0, 8);
  display.println("Hello Circuitera");
  display.println("128 x 64 OLED"); display.display();
}
void loop() {}

The launch buttons use this same code and a matching saved circuit.

Build it step by step

  1. Open a complete project

    Launch in Simulator creates a separate Uno sketch and its matching wired circuit. Existing sketches are preserved. Press Run to compile and execute.

  2. Explore the live circuit

    Change the text and rerun. Keep text inside the 128×64 screen.

  3. Try it on hardware

    Disconnect power while wiring. Match terminal names in the table, select the exact board, Verify, then connect and upload. Check component ratings and power requirements first.

Understand the sketch

Buffer then send

Drawing changes a RAM buffer. display.display sends that buffer over I2C to address 0x3C; without it the screen will not update.

If something is different

No image

Use the supported SSD1306 I2C display, address 60 decimal (0x3C), and the A4/A5 bus. This is not an SH1106 driver.

Expected output and tested scope

The SSD1306 framebuffer contains the text rendered through Adafruit GFX.

Version 1 · Last source- and build-matched test: 2026-10-25. Actual shipped AVR-GCC WASM compilation and Uno AVR engine execution; no physical hardware test.

Supported tutorial target: Arduino Uno R3 / ATmega328P. Compile: PASS · Modeled execution: PASS. Other boards require a separate review of pins, voltage, libraries and the exact build profile.

Keep exploring.