/ OLED Display 0.96" Setup Guide
← All Guides Shop ↗
🌐 Translate:
⏱ 20 min 🔌 4 wires (I2C) ✅ Beginner

OLED Display 0.96"
128x64 Setup Guide

Display crisp text and graphics on a tiny OLED screen using just 4 wires. No backlight needed — the pixels glow themselves, giving excellent contrast in any lighting condition.

🛒
This guide covers the 0.96" 128×64 I2C OLED Display (SSD1306 chip, Blue colour). View product page ↗
📺

Video walkthrough

Prefer to watch? These cover the same steps.

Arduino OLED Display SSD1306 Tutorial
YouTube
▶ YouTube
OLED Display with Arduino — Getting Started
YouTube
▶ YouTube

Community videos. Tishvi is not affiliated with creators.

1

About the OLED Display

What makes OLED different from a regular LCD.

Unlike an LCD, each pixel on an OLED (Organic Light-Emitting Diode) display produces its own light — there is no backlight. This means true-black backgrounds (off pixels use zero power), very high contrast, and a thinner module. Communication uses I2C (2 data wires), so you keep 12 digital pins free on your Arduino.

📐
Resolution
128 × 64 pixels
0.96 inch diagonal
Supply Voltage
3.3V – 5V
Arduino 5V pin works
🔌
Interface
I2C (IIC)
Address: 0x3C
🖥
Controller Chip
SSD1306
Industry standard
ℹ️
Your display shows blue pixels on a black background. The contrast is excellent — visible indoors and in shaded outdoor conditions.
2

What You Need

Everything required for this guide.

Tishvi Arduino UNO R3

Must already be set up with Arduino IDE. See the UNO R3 Setup Guide first if needed.

0.96" I2C OLED Display (SSD1306)

The 4-pin module with pins labelled GND · VCC · SCL · SDA.

4× Jumper Wires (Female-to-Male)

Female end plugs into the OLED's header pins. Male end goes into Arduino.

USB-A to USB-B Cable + Computer with Arduino IDE

For uploading sketches. You'll also install two libraries via the Library Manager.

3

Install Required Libraries

Two libraries needed — install both before uploading any sketch.

Open Arduino IDE and go to Sketch → Include Library → Manage Libraries… (or press Ctrl+Shift+I). Search for and install both libraries below:

1

Adafruit SSD1306

Search: Adafruit SSD1306 — Install the one by Adafruit. This is the driver for the display chip.

When prompted to install dependencies, click "Install All".

2

Adafruit GFX Library

Search: Adafruit GFX — Install the one by Adafruit. This provides text, shapes, and bitmap drawing functions.

This is usually installed automatically when you install SSD1306 (step 1) — check it's present before continuing.

Both libraries installed? Go to Sketch → Include Library — you should see Adafruit SSD1306 and Adafruit GFX Library listed. You're ready to wire up.
4

Wiring (I2C)

4 wires — 2 power, 2 data.

ARDUINO UNO R3 ANALOG PINS 5V GND A5 A4 OLED 128×64 GND VCC SCL SDA
OLED PinArduino UNO R3 PinWire ColourNotes
GNDGNDBlackCommon ground
VCC5VRedModule accepts 3.3V–5V; 5V is fine
SCLA5GreenI2C Clock — fixed to A5 on UNO R3
SDAA4BlueI2C Data — fixed to A4 on UNO R3
⚠️
The OLED module pins are typically ordered GND · VCC · SCL · SDA on the header (left to right with the screen facing you) — but always verify the labels printed on your PCB before powering up.
💡
I2C bus sharing: A5 (SCL) and A4 (SDA) are shared by all I2C devices. You can connect an OLED and an LCD (or other I2C sensor) at the same time, as long as each has a different I2C address.
5

Hello World Sketch

Your first text on the OLED display.

Upload this sketch — it initialises the display and prints a welcome message in two different text sizes.

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

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

void setup() {
  Serial.begin(9600);

  if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
    Serial.println("OLED not found! Check wiring.");
    while (true);
  }

  display.clearDisplay();

  display.setTextSize(2);
  display.setTextColor(SSD1306_WHITE);
  display.setCursor(10, 10);
  display.println("Hello!");

  display.setTextSize(1);
  display.setCursor(0, 40);
  display.println("OLED is working");
  display.println("guide.tishvi.com");

  display.display();    // Push to screen
}

void loop() {
  // Nothing — message stays on screen
}
After uploading, the OLED should immediately show "Hello!" in large text and two lines of smaller text below it. If the screen stays blank, see the Troubleshooting section.
6

Live Counter Sketch

Update the screen dynamically — the basis for all live displays.

This sketch clears the display each second and redraws a counter. The pattern — clearDisplay(), draw, display() — is the foundation for showing any live sensor data.

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

Adafruit_SSD1306 display(128, 64, &Wire, -1);
unsigned long counter = 0;

void setup() {
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
  display.clearDisplay();
  display.display();
}

void loop() {
  display.clearDisplay();

  // Header line
  display.setTextSize(1);
  display.setTextColor(SSD1306_WHITE);
  display.setCursor(0, 0);
  display.println("  Tishvi Counter");
  display.drawLine(0, 10, 128, 10, SSD1306_WHITE);

  // Large counter value
  display.setTextSize(3);
  display.setCursor(0, 22);
  display.println(counter);

  display.display();   // Render frame
  counter++;
  delay(1000);
}
💡
Key pattern: Always call display.clearDisplay() then draw everything, then call display.display(). Without display.display() at the end, nothing appears — the drawing functions only update a buffer in RAM.
7

Troubleshooting

Screen blank? Check these in order.

?

Screen stays completely blank / black

Most common cause: wrong I2C address. The default is 0x3C but some modules use 0x3D. Run an I2C scanner sketch (search "Arduino I2C scanner") to find your module's address, then update the display.begin() call.

?

Serial Monitor says "OLED not found"

Check SDA goes to A4 and SCL goes to A5 — these are easy to swap. Also verify VCC is connected to 5V (not 3.3V). A missing GND wire is another common cause.

?

Compile error: "Adafruit_SSD1306.h not found"

The library isn't installed. Go to Sketch → Include Library → Manage Libraries, search for Adafruit SSD1306 and install it. Also install Adafruit GFX.

?

Screen flickers or shows noise

Power supply noise. Add a 100µF capacitor between VCC and GND on the display. Also make sure you're using a wall adapter, not a laptop's USB port, for power.

?

Display shows text once but never updates

Make sure you're calling display.clearDisplay() at the start of each loop iteration and display.display() at the end. Without this pattern, the buffer never gets refreshed.

Download Sample Sketch

Get a ready-to-upload .ino file for the OLED display.

Download the full sample sketch — it includes a welcome screen, a live counter, and detailed comments explaining every display function. Requires Adafruit SSD1306 + GFX libraries (see Step 3).

📄
oled_display_sample.ino
Welcome screen · Live counter · SSD1306 · Adafruit GFX · Well-commented
⬇ Download .ino
💡
Libraries must be installed first — see Step 3. In Arduino IDE go to File → Open, select the .ino file. The sketch will not compile if Adafruit SSD1306 or GFX are missing.