0.96″ 128×64 SSD1306 I2C OLED Display – Arduino Wiring, Code & Troubleshooting

AUSCOMTECH PRODUCT SUPPORT

0.96″ 128×64 SSD1306 I2C OLED Display – Arduino Wiring, Code & Troubleshooting

Model: SSD1306 controller IC; 0.96″ 128×64 I2C OLED moduleSKU: 3-4-1-1

This 0.96-inch blue OLED module provides a 128×64 pixel monochrome display using the SSD1306 display controller and a four-wire I2C connection.

The pictured module is labelled GND, VDD, SCK and SDA. This guide covers Arduino UNO wiring, finding the I2C address, installing the required libraries, displaying text and graphics, and solving common connection problems.

SSD1306 OLED Overview

Controller SSD1306
Resolution 128 × 64 pixels
Interface I2C / IIC
Display Colour Blue monochrome
Listed Module Supply 3–5V DC
SSD1306 I2C Addresses 0x3C or 0x3D
SCK means the I2C clock connection on this module.

The PCB uses the label SCK, but because this is the four-pin I2C version it connects to the controller's SCL or I2C clock pin. It is not an SPI connection in this configuration.

Power & Voltage Information

The AuscomTech product listing specifies a 3–5V DC supply at the module's VDD connection. The Arduino UNO example below therefore uses the UNO 5V pin to power this specific listed module.

Do not confuse the module supply rating with the bare SSD1306 IC rating.

The SSD1306 controller itself operates internally at lower logic voltages. The 3–5V specification applies to this assembled OLED module as listed. Do not apply 5V directly to a bare SSD1306 IC, bare OLED panel or a different unverified breakout board simply because it looks similar.

For a 3.3V microcontroller or Raspberry Pi, use a 3.3V supply for the OLED module unless the documentation for that controller and module combination specifies otherwise.

Module Connections & Arduino UNO Wiring

The four connections are printed on the front of the pictured PCB. Connect them according to the markings rather than relying only on wire colour or physical position.

OLED Pin Function Arduino UNO
GND Ground GND
VDD Module power 5V for this listed 3–5V module
SCK I2C clock / SCL A5 / SCL
SDA I2C data A4 / SDA
No separate reset pin is exposed.

This four-pin module does not provide a separate RESET connection at its header, so the Arduino example configures the Adafruit SSD1306 library with a reset pin value of -1.

Find the I2C Address First

The SSD1306 controller supports two 7-bit I2C addresses: 0x3C and 0x3D. The address depends on how the module manufacturer has configured the SSD1306 address-selection input, so do not assume the address from display resolution alone.

Connect only the OLED and Arduino UNO as shown above, upload this scanner and open the Serial Monitor at 115200 baud.

Arduino UNO – I2C Address Scanner
#include <Wire.h>

void setup() {
  Serial.begin(115200);
  Wire.begin();

  delay(500);
  Serial.println(F("I2C scanner"));
}

void loop() {
  byte deviceCount = 0;

  for (byte address = 1; address < 127; address++) {
    Wire.beginTransmission(address);
    byte error = Wire.endTransmission();

    if (error == 0) {
      Serial.print(F("Found I2C device at 0x"));

      if (address < 16) {
        Serial.print('0');
      }

      Serial.println(address, HEX);
      deviceCount++;
    }
  }

  if (deviceCount == 0) {
    Serial.println(F("No I2C devices found."));
  }

  Serial.println(F("Scan complete."));

  while (true) {
    delay(1000);
  }
}

Expected Scanner Result

A correctly connected SSD1306 should normally be reported as 0x3C or 0x3D. Write down the address shown by your module because the same value must be used in the display sketch.

No address found?

Do not continue changing display-library settings yet. First recheck VDD, GND, SDA and SCK wiring. In particular, make sure SCK is connected to the Arduino's SCL/A5 connection and SDA is connected to SDA/A4.

Arduino Library Installation

The display example uses the Adafruit SSD1306 and Adafruit GFX libraries.

  1. Open the Arduino IDE.
  2. Open Tools → Manage Libraries or the Library Manager panel.
  3. Search for Adafruit SSD1306 and install it.
  4. Search for Adafruit GFX Library and install it if it was not installed automatically.
  5. Accept any required library dependencies offered by the Arduino IDE.

The Arduino Wire library used for I2C communication is included with the Arduino board package and does not require a separate installation.

Basic Arduino Display Test

The example below assumes the scanner reported address 0x3C. If your scanner reported 0x3D, change the OLED_ADDRESS line before uploading.

Arduino UNO – SSD1306 128×64 OLED Test
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64

// This four-pin module has no separate reset pin.
#define OLED_RESET -1

// Change to 0x3D if that is what the I2C scanner reports.
#define OLED_ADDRESS 0x3C

Adafruit_SSD1306 display(
  SCREEN_WIDTH,
  SCREEN_HEIGHT,
  &Wire,
  OLED_RESET
);

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

  if (!display.begin(SSD1306_SWITCHCAPVCC, OLED_ADDRESS)) {
    Serial.println(F("SSD1306 initialisation failed."));
    while (true) {
      delay(1000);
    }
  }

  display.clearDisplay();
  display.setTextColor(SSD1306_WHITE);
  display.setTextSize(1);

  display.drawRect(
    0,
    0,
    SCREEN_WIDTH,
    SCREEN_HEIGHT,
    SSD1306_WHITE
  );

  display.setCursor(8, 8);
  display.println(F("AuscomTech"));

  display.setCursor(8, 20);
  display.println(F("SSD1306 128x64"));

  display.setCursor(8, 32);
  display.println(F("I2C OK"));

  // Drawing commands modify a RAM buffer.
  // display() transfers that buffer to the OLED.
  display.display();
}

void loop() {
  static unsigned long count = 0;

  // Clear only the counter area.
  display.fillRect(
    1,
    40,
    126,
    15,
    SSD1306_BLACK
  );

  display.setCursor(8, 44);
  display.print(F("Count: "));
  display.print(count++);

  display.display();
  delay(1000);
}

Expected Result

The OLED should show a rectangular border with AuscomTech, SSD1306 128x64 and I2C OK. A counter near the bottom of the display should increase approximately once per second.

If the counter changes, both the I2C communication and repeated display-buffer updates are working.

Understanding the Display Buffer

Adafruit GFX drawing commands change an image buffer stored in the microcontroller's memory. After drawing text, lines, rectangles or other graphics, call display.display() to transfer the updated buffer to the OLED.

If you change drawing commands but forget display.display(), the program may run normally while the visible screen remains unchanged.

Raspberry Pi & Other 3.3V Controllers

The same four connections are used with a Raspberry Pi, ESP32, Raspberry Pi Pico or other controller that supports I2C: power, ground, SDA and SCL.

OLED Pin 3.3V Controller Connection
GND Controller ground
VDD 3.3V supply
SCK Controller I2C SCL
SDA Controller I2C SDA

Use the SDA and SCL pins documented for your particular controller board. On platforms such as Raspberry Pi, I2C must also be enabled in the operating system before software can communicate with the display.

Troubleshooting

I2C scanner reports no devices

  • Confirm VDD and GND are connected correctly.
  • Confirm module SCK connects to Arduino SCL/A5.
  • Confirm module SDA connects to Arduino SDA/A4.
  • Check for loose jumper wires or unsoldered header pins.
  • Disconnect other I2C devices while diagnosing the display.

Scanner finds the OLED but the display stays blank

  • Make sure the address in OLED_ADDRESS exactly matches the scanner result.
  • Confirm the sketch is configured for 128 × 64 pixels.
  • Check that display.begin() succeeds.
  • Make sure display.display() is called after drawing.
  • Power-cycle the controller and OLED after checking the wiring.

Code works at 0x3C but another example uses 0x3D

The display resolution does not uniquely determine the I2C address. Use the address actually reported by the scanner for your module.

Display is upside down

The Adafruit GFX rotation setting can rotate the drawing without changing the wiring. Add display.setRotation(2); after display initialisation and before drawing if a 180-degree rotation suits the installation.

Display is detected but graphics are shifted or incorrect

  • Confirm the sketch specifies a 128 × 64 display.
  • Confirm the installed module actually uses an SSD1306 controller.
  • Similar-looking OLED modules can use different controller ICs and may require a different library or initialisation sequence.

Display becomes unreliable with longer wiring

  • Keep SDA, SCL, power and ground wiring reasonably short during initial testing.
  • Check that all ground connections are secure.
  • Test the OLED by itself before adding other I2C devices.
  • Avoid adding unnecessary extra I2C pull-up resistors unless the bus requirements have been checked.
⚠️ Important

Small 0.96-inch OLED breakout boards can look almost identical while using different regulators, pull-up arrangements, I2C address settings or even different display-controller ICs. Follow the markings on the specific AuscomTech module and use the I2C scanner to confirm its address. The 3–5V supply information in this guide applies to the listed assembled module and must not be treated as a 5V rating for a bare SSD1306 IC or an unverified look-alike board.

Still need help?Contact AuscomTech Support and include the product or model shown above.
Contact Support →