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.
Video walkthrough
Prefer to watch? These cover the same steps.
Community videos. Tishvi is not affiliated with creators.
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.
0.96 inch diagonal
Arduino 5V pin works
Address: 0x3C
Industry standard
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.
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:
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".
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.
Adafruit SSD1306 and Adafruit GFX Library listed. You're ready to wire up.Wiring (I2C)
4 wires — 2 power, 2 data.
| OLED Pin | Arduino UNO R3 Pin | Wire Colour | Notes |
|---|---|---|---|
| GND | GND | Black | Common ground |
| VCC | 5V | Red | Module accepts 3.3V–5V; 5V is fine |
| SCL | A5 | Green | I2C Clock — fixed to A5 on UNO R3 |
| SDA | A4 | Blue | I2C Data — fixed to A4 on UNO R3 |
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.
#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 }
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.
#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); }
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.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).
.ino file. The sketch will not compile if Adafruit SSD1306 or GFX are missing.Next Steps
Ideas for your OLED display project.
Display Sensor Data
Combine the HC-SR04 distance sensor with the OLED — show live distance readings on the screen instead of Serial Monitor.
16×2 LCD Alternative
Need more text space? The 16×2 LCD shows 2 rows of 16 characters and is easier to read at a distance.
Arduino Project Hub
Mini weather stations, game displays, clocks, health monitors — hundreds of OLED projects.