Preview build — page text is a draft awaiting human review. Code badges come from real compiles. The flasher is real but not yet hardware-tested; the Playground is still a preview.

SSD1306 OLED with Arduino Pro Mini — I2C on the hidden A4/A5 pads

Connect a 0.96" SSD1306 OLED to an Arduino Pro Mini using the inner A4 (SDA) and A5 (SCL) pads, and show the supply voltage and uptime.

Arduino C++Verified — core avr 1.8.8, Adafruit SSD1306 2.5.17, 3 Nov 2026Compile-only

Community draft — report a mistake

A small OLED turns a Pro Mini into a self-contained gadget: a battery tester, a tiny clock, a sensor readout. The catch is where its I2C pins are — A4 (SDA) and A5 (SCL) sit on two inner pads, not on the rows you soldered headers to.

Solder two short wires to those pads, then wire the OLED as usual. The sketch shows the Pro Mini’s own supply voltage (measured against the internal 1.1 V reference) and its uptime.

Wiring

Arduino Pro Mini (5 V)Only the pins used are shown · 5 V logicSSD1306 OLED 0.96″ (128×64, I2C)GNDVCCA4A5GNDVCCSCLSDA
Also needed: Short header pins or thin wire for the A4/A5 pads, USB-serial adapter with DTR for uploading.
Every connection
Arduino Pro Mini (5 V)SSD1306 OLED 0.96″ (128×64, I2C)WireNotes
GNDGNDblack
VCCVCCred
A5SCLyellowInner pad — solder a wire or short header.
A4SDAblueInner pad — solder a wire or short header.

3.3–5 V (on-board regulator) part, 5 V board. Most modules have a regulator and run from 3.3 V or 5 V. Their I2C pull-ups go to VCC, so on ESP32 and Pico power the OLED from 3.3 V to keep SDA/SCL at a safe level.

Board quirks

  • A4 and A5 are not on the edge rows of the Pro Mini. They are two extra pads inside the board — next to A2/A3 on most boards, at the far end on some clones. Check your silkscreen before soldering.
  • Solder thin wires to the pads rather than headers if the board will sit on a breadboard; inner headers stop it plugging in.
  • The OLED’s 1 KB frame buffer takes half of the ATmega328P’s RAM, just as on a Nano.
  • On a 3.3 V Pro Mini the OLED runs fine from VCC at 3.3 V, and the supply-voltage reading shows when the Li-ion cell is getting low.

Code

ssd1306-promini.inoArduino C++Open in PlaygroundOpen in PlaygroundFlash
// SSD1306 OLED on an Arduino Pro Mini — I2C on the inner A4 (SDA) / A5 (SCL) pads.
// GND → GND, VCC → VCC, SCL → A5, SDA → A4. Shows supply voltage (handy on batteries) and uptime.
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

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

long readVccMillivolts() {
  ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
  delay(2);
  ADCSRA |= _BV(ADSC);
  while (bit_is_set(ADCSRA, ADSC)) {}
  return 1125300L / ADC;
}

void setup() {
  Serial.begin(115200);
  if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
    Serial.println(F("SSD1306 failed - check the A4/A5 pads and address"));
    for (;;) {}
  }
  display.setTextColor(SSD1306_WHITE);
  Serial.println(F("OLED ready"));
}

void loop() {
  long mv = readVccMillivolts();
  display.clearDisplay();
  display.setTextSize(1);
  display.setCursor(0, 0);
  display.println(F("Pro Mini"));
  display.setTextSize(2);
  display.setCursor(0, 18);
  display.print(mv / 1000.0, 2);
  display.println(F(" V"));
  display.setTextSize(1);
  display.setCursor(0, 48);
  display.print(F("Up "));
  display.print(millis() / 1000);
  display.print(F(" s"));
  display.display();
  Serial.print(F("VCC: "));
  Serial.print(mv);
  Serial.println(F(" mV"));
  delay(1000);
}

Library: Adafruit SSD1306 (Adafruit (also install Adafruit GFX Library)) — compiled with Adafruit SSD1306 2.5.17.

Expected serial output

Serial Monitor · 115200Output
OLED ready
VCC: 4991 mV

Common errors

SSD1306 failed

SDA/SCL on the wrong pads, swapped, or the address is 0x3D. Run an I2C scanner. Full fix.

avrdude: stk500_getsync() not in sync

Board not reset at upload time: wire DTR → GRN through the adapter, or tap reset when “Uploading…” appears. Full fix.

↑↓ to move · Enter to open