I2C module wiring being checked on an electronics workbench

Free I2C tool

I2C Scanner Code for Arduino & ESP32

Use these Arduino and ESP32 scanner sketches to find OLED, LCD, RTC, EEPROM, and sensor addresses. If nothing appears, follow the wiring checks before replacing the module.

Copy-paste scanner

Choose your board and upload the scanner.

Open Serial Monitor after upload. If the scanner prints an address like `0x3C`, use that address in your display or sensor library.

Arduino I2C scanner

For Arduino Uno and Nano, SDA is usually A4 and SCL is A5. For Mega, SDA is 20 and SCL is 21.

#include <Wire.h>

void setup() {
  Wire.begin();
  Serial.begin(9600);
  while (!Serial);
  Serial.println("I2C scanner started");
}

void loop() {
  byte error;
  byte address;
  int devices = 0;

  Serial.println("Scanning...");

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

    if (error == 0) {
      Serial.print("I2C device found at 0x");
      if (address < 16) Serial.print("0");
      Serial.println(address, HEX);
      devices++;
    }
  }

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

  delay(3000);
}

How to use the Arduino I2C Scanner

An Arduino I2C scanner is a simple diagnostic tool that pings every possible I2C address (from 1 to 127) on the bus. If a device acknowledges the ping, the scanner reports the address. To use it, simply connect your device's SDA and SCL pins to the corresponding pins on your microcontroller, power the device, upload the code above, and open your Serial Monitor.

Address Database

Searchable I2C Device Directory

Verify default addresses, pin configurations, and troubleshooting guidelines for common modules.

SSD1306 OLED Display

0x3C / 0x3D

Popular 0.96 inch and 1.3 inch monochrome graphic displays using I2C communication.

TypeDisplay
Alt Address PinsSA0 pin (GND=0x3C, VCC=0x3D)
Driver LibraryAdafruit_SSD1306 / U8g2
OLED Debug Guide →

SH1106 OLED Display

0x3C / 0x3D

Large 1.3 inch OLED screen modules, often wired with slightly different offset configurations than SSD1306.

TypeDisplay
Alt Address PinsAddress Jumper on board back
Driver LibraryU8g2 / Adafruit_SH110X
OLED Debug Guide →

LCD 16x2 / 20x4 Backpack

0x27 / 0x3F

PCF8574-based interface board allowing standard character LCDs to run over I2C.

TypeDisplay Backpack
Alt Address PinsA0, A1, A2 pads (0x20 - 0x27)
Driver LibraryLiquidCrystal_I2C
LCD Debug Guide →

BME280 Sensor

0x76 / 0x77

High-precision barometric pressure, temperature, and relative humidity sensor by Bosch.

TypeEnvironmental Sensor
Alt Address PinsSDO pin (GND=0x76, VCC=0x77)
Driver LibraryAdafruit_BME280
Sensor Debug Guide →

BMP280 Sensor

0x76 / 0x77

Barometric pressure and temperature sensor, a low-cost alternative to the BME280 without humidity sensing.

TypeEnvironmental Sensor
Alt Address PinsSDO pin (GND=0x76, VCC=0x77)
Driver LibraryAdafruit_BMP280
Sensor Debug Guide →

MPU6050 IMU

0x68 / 0x69

3-axis accelerometer and 3-axis gyroscope motion tracking sensor.

TypeMotion IMU Sensor
Alt Address PinsAD0 pin (GND=0x68, VCC=0x69)
Driver LibraryAdafruit_MPU6050
Sensor Debug Guide →

DS3231 RTC

0x68 (+0x57)

Extremely accurate, temperature-compensated real-time clock. Common boards also host a 24C32 EEPROM at 0x57.

TypeTimekeeping RTC
Alt Address PinsClock: Fixed 0x68; EEPROM: A0,A1,A2 pads
Driver LibraryRTClib
Sensor Debug Guide →

INA219 Power Monitor

0x40

Shunt current and high-side voltage monitor. Ideal for measuring battery drain and power rails.

TypePower Measurement
Alt Address PinsSolder pads A0, A1 (up to 16 combinations)
Driver LibraryAdafruit_INA219
Sensor Debug Guide →

ADXL345 Accelerometer

0x53 / 0x1D

Thin, ultra-low power 3-axis accelerometer with high resolution (up to 13-bit) measurement.

TypeMotion Sensor
Alt Address PinsSDO pin (GND=0x53, VCC=0x1D)
Driver LibraryAdafruit_ADXL345
Sensor Debug Guide →

BH1750 Light Sensor

0x23 / 0x5C

Digital ambient light intensity sensor. Directly outputs calibrated lux values without math overhead.

TypeLight Sensor
Alt Address PinsADD pin (GND=0x23, VCC=0x5C)
Driver Libraryhp_BH1750
Sensor Debug Guide →

VL53L0X ToF Sensor

0x29

Time-of-Flight (ToF) laser-ranging sensor measuring distance based on photon travel times.

TypeDistance Sensor
Alt Address PinsXSHUT pin power-cycle (Software re-map)
Driver LibraryAdafruit_VL53L0X
Sensor Debug Guide →

MCP23017 I/O Expander

0x20 - 0x27

16-bit input/output port expander. Adds 16 general-purpose I/O pins over the I2C bus.

TypeGPIO Expansion
Alt Address PinsA0, A1, A2 pins (select from 8 addresses)
Driver LibraryAdafruit_MCP23017
Sensor Debug Guide →

ADS1115 16-Bit ADC

0x48 - 0x4B

High-resolution, 4-channel analog-to-digital converter, ideal for microcontrollers lacking built-in ADCs.

TypeAnalog-to-Digital
Alt Address PinsADDR pin (to GND, VCC, SDA, or SCL)
Driver LibraryAdafruit_ADS1X15
Sensor Debug Guide →

MPR121 Touch Sensor

0x5A

Capacitive touch controller supporting up to 12 individual electrode touch pads.

TypeUser Input Sensor
Alt Address PinsADDR pin (to GND, VCC, SDA, or SCL)
Driver LibraryAdafruit_MPR121
Sensor Debug Guide →

TSL2561 Light Sensor

0x39

Precision digital light sensor measuring both infrared and full-spectrum light for precise lux calculations.

TypeLight Sensor
Alt Address PinsADDR pin (GND=0x29, VCC=0x49, Float=0x39)
Driver LibraryAdafruit_TSL2561
Sensor Debug Guide →

Debug path

What to do with the scanner result.

FAQ

I2C scanner questions

Can two I2C devices use the same address?

Not on the same bus unless you use an I2C multiplexer or one device supports address selection. If two modules share the same fixed address, the scanner may behave unpredictably.

Why does the scanner find an address but my display still stays blank?

The I2C bus is working, but your library, controller type, address, screen size, or display initialization may still be wrong.

Do I need pullup resistors?

Many modules already include pullups. If wires are long, modules are bare, or the bus is unstable, external pullups may be needed.