Build it step by step
0 of 7 doneWire the working circuit
VCC, GND, SDA to A4, SCL to A5.
Install the libraries
Adafruit SSD1306 and GFX.
Upload and open the monitor
The scanner lists the display and the screen shows It works.
Look away while the helper swaps SDA and SCL
The scanner finds nothing.
Fix and re-test
The display returns.
Helper loosens the power wire
The scanner finds nothing or the display flickers.
Helper changes the address in the sketch
The scanner finds the display but the screen stays blank.
How do you build a blank OLED fault hunt?
An I2C OLED stays blank with typical mistakes planted: SDA and SCL swapped, a loose power wire or the wrong address. A scanner sketch finds the display and shows the address, and the display then comes to life. You need Arduino Nano, SSD1306 OLED Display, Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm). It takes 7 steps and about 60 minutes.
- Level
- Beginner
- Time
- About 60 min
- Parts
- 4
Parts list
- Development BoardsBuyArduino Nano × 1
- DisplaysBuy
- PrototypingBuy
- PrototypingBuy
Tick what you already own. It saves to My Garage, so “Build with what I have” knows.
Wiring
| From | To | Why |
|---|---|---|
| OLED VCC | Nano 5V | Power (check your OLED accepts 5 V, otherwise use 3V3) |
| OLED GND | Nano GND | Common ground |
| OLED SDA | Nano A4 | I2C data |
| OLED SCL | Nano A5 | I2C clock |
Code
An I2C bus needs power, ground, a data line and a clock line, and every device has an address. The scanner tries each address from 1 to 126 and prints those that answer, so you can see whether the display is on the bus at all. Most 0.96 inch OLEDs are at 0x3C, and some are at 0x3D. If nothing is found, the problem is wiring or power. If something is found but the sketch uses a different address, the display stays blank. Fault hunt: build it working so the display shows its message. Then ask a helper to plant one fault at a time while you look away. Safe faults are swapping the SDA and SCL wires, loosening the power wire, and setting the sketch's address to the wrong value. Use the scanner output and the voltage at the module's VCC pin to find each fault. Never swap the power and ground wires on the display.
Runs on a virtual Arduino Nano in your browser, with sliders for the sensors. Happy with it? Verify and upload to your real board from the same page (Chrome or Edge on a computer).
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 oled(128, 64, &Wire, -1);
void setup() {
Serial.begin(9600);
Wire.begin();
Serial.println("Scanning the I2C bus...");
byte found = 0;
for (byte addr = 1; addr < 127; addr++) {
Wire.beginTransmission(addr);
if (Wire.endTransmission() == 0) {
Serial.print("Device found at 0x");
if (addr < 16) Serial.print("0");
Serial.println(addr, HEX);
if (addr == 0x3C || addr == 0x3D) found = addr; // the usual OLED addresses
}
}
if (found == 0) {
Serial.println("No OLED found. Check power, ground, SDA on A4 and SCL on A5, and that SDA and SCL are not swapped.");
return;
}
if (!oled.begin(SSD1306_SWITCHCAPVCC, found)) {
Serial.println("Found a device, but the display did not start. Check the library and the screen size.");
return;
}
oled.clearDisplay();
oled.setTextColor(SSD1306_WHITE);
oled.setTextSize(2);
oled.setCursor(0, 0);
oled.println("It works!");
oled.setTextSize(1);
oled.print("Address 0x");
oled.println(found, HEX);
oled.display();
}
void loop() {}What the serial monitor should show
Open the serial monitor at the baud rate in the code. This is what our simulator prints for a virtual Arduino Nano with its sensors at their default values. Your numbers will follow your real readings, but the format should match.
Scanning the I2C bus... Device found at 0x3C
Test checklist
What you should see at each check. If a reading is far off, stop and use the troubleshooting list.
| Check | Expected |
|---|---|
| Working circuit | Device found at 0x3C and a message on screen |
| SDA and SCL swapped | No device found |
| Power wire loose | No device found, or flicker |
| Wrong address in the sketch | Scanner finds it, the screen stays blank |
| Meter on VCC | About 5 V (or 3.3 V if you used 3V3) |
If it does not work
Nothing found with correct wiring
Check the pins A4 and A5 and the power at the module.
Found at 0x3D
The sketch picks the address it finds, so it still works.
Display starts then garbles
The screen size or the controller type may differ.
Device found but blank
Check the library and the screen size in the sketch.
Compile errors
Install both libraries.
Still stuck? Find the fault step by step with your multimeter →
Common questions
What parts do I need for the blank OLED fault hunt?
Arduino Nano, SSD1306 OLED Display, Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm).
How long does the blank OLED fault hunt take to build?
About 60 minutes for a beginner maker, in 7 steps.
How do I know the blank OLED fault hunt works?
Working circuit: Device found at 0x3C and a message on screen. SDA and SCL swapped: No device found. Power wire loose: No device found, or flicker.
Nothing found with correct wiring: what should I check?
Check the pins A4 and A5 and the power at the module.
Found at 0x3D: what should I check?
The sketch picks the address it finds, so it still works.
Display starts then garbles: what should I check?
The screen size or the controller type may differ.
Device found but blank: what should I check?
Check the library and the screen size in the sketch.
