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) | SSD1306 OLED 0.96″ (128×64, I2C) | Wire | Notes |
|---|---|---|---|
| GND | GND | black | |
| VCC | VCC | red | |
| A5 | SCL | yellow | Inner pad — solder a wire or short header. |
| A4 | SDA | blue | Inner 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 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);
}// 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
OLED ready
VCC: 4991 mVOLED ready VCC: 4991 mV