How I²C addresses work
Every device on an I²C bus answers to a 7-bit address, from 0x08 to 0x77. Many chips let you pick one of two, four or eight addresses by tying pins to ground or to the supply; others have a single fixed address. Two devices on the same address answer at the same time, and both readings are garbage.
Some datasheets give 8-bit values, the address shifted left with the read/write bit added: the VL53L0X is listed as 0x52/0x53, the BMP180 as 0xEE/0xEF. Shift right by one to get the 7-bit address libraries and scanners use: 0x29 and 0x77.
Reserved addresses
| Address | |
|---|---|
| 0x00 | General call (write) or START byte (read) |
| 0x01 | CBUS address |
| 0x02 | Reserved for a different bus format |
| 0x03 | Reserved for future purposes |
| 0x04–0x07 | Hs-mode controller code |
| 0x78–0x7B | 10-bit target addressing |
| 0x7C–0x7F | Device ID |
From the NXP I²C-bus specification (UM10204). Use only 0x08 to 0x77 for your devices.
When two devices clash
First look for an address pin: moving one device is the cleanest fix. If both addresses are fixed, as with a DS3231 clock and a DS1307, or you need two identical sensors with no address pin, use a TCA9548A multiplexer, which gives you eight separate branches behind one address, or put the second device on another I²C bus. The ESP32, ESP32-S3 and RP2040 have two I²C controllers; the ESP32-C3 has one.
Finding what is on your bus
In ESPHome, the i2c component scans the bus at boot and lists the addresses it finds in the log. In Arduino, the classic I2C scanner sketch does the same over the serial monitor. If a device doesn’t show up, check power, SDA and SCL, the pull-ups and its address pin.
Pull-up resistors
I²C lines are open-drain: chips only pull them low, and resistors pull them back up. Too strong a pull-up and the chips can’t pull the line low enough; too weak and the line rises too slowly for the speed. The specification gives both limits.
Rmin = (VDD − 0.4 V) ÷ 3 mA (VDD > 2 V; 20 mA at 1 MHz) Rmax = tr ÷ (0.8473 × Cbus) tr = 1000 ns at 100 kHz, 300 ns at 400 kHz, 120 ns at 1 MHz
All the devices in the list
| Address | |||
|---|---|---|---|
| QMC5883L | 3-axis magnetometer | 0x0D | fixed address |
| VEML6075 | UVA/UVB light sensor | 0x10 | fixed address |
| LIS2DH12 | 3-axis accelerometer | 0x18, 0x19 | SA0: GND → 0x18 · VDD → 0x19 |
| MCP9808 | digital temperature sensor | 0x18–0x1F | A2 A1 A0 → 0x18–0x1F |
| MMA8451Q | 3-axis accelerometer | 0x1C, 0x1D | SA0: GND → 0x1C · VDD → 0x1D |
| ADXL345 | 3-axis accelerometer | 0x1D, 0x53 | ALT ADDRESS: GND → 0x53 · VDD → 0x1D |
| MCP23008 | 8-bit I/O expander | 0x20–0x27 | A2 A1 A0 → 0x20–0x27 |
| MCP23017 | 16-bit I/O expander | 0x20–0x27 | A2 A1 A0 → 0x20–0x27 |
| PCF8574 | 8-bit I/O expander (I2C LCD backpacks) | 0x20–0x27 | A2 A1 A0 → 0x20–0x27 |
| PCF8575 | 16-bit I/O expander | 0x20–0x27 | A2 A1 A0 → 0x20–0x27 |
| TCA9555 | 16-bit I/O expander with interrupt | 0x20–0x27 | A2 A1 A0 → 0x20–0x27 |
| PN532 | NFC/RFID controller (I2C mode) | 0x24 | fixed address |
| BNO055 | 9-axis absolute orientation sensor with fusion | 0x28, 0x29 | COM3: GND → 0x28 · VDD → 0x29 |
| TCS34725 | RGB colour sensor | 0x29 | fixed address |
| VL53L0X | time-of-flight distance sensor | 0x29 | |
| MLX90640 | 32x24 thermal camera | 0x33 | |
| AXP192 | power management IC (PMIC) | 0x34 | fixed address |
| AXP2101 | power management IC (PMIC) | 0x34 | fixed address |
| PCF8574A | 8-bit I/O expander, alternate address range | 0x38–0x3F | A2 A1 A0 → 0x38–0x3F |
| VEML6070 | UV light sensor | 0x38 | fixed address |
| APDS-9960 | gesture, proximity, ambient light and RGB sensor | 0x39 | fixed address |
| SH1106 | 132x64 OLED controller | 0x3C, 0x3D | SA0: GND → 0x3C · VDD → 0x3D |
| SSD1306 | 128x64 / 128x32 OLED controller | 0x3C, 0x3D | SA0 (D/C#): GND → 0x3C · VDD → 0x3D |
| SX1509 | 16-channel I/O expander with LED driver and keypad engine | 0x3E, 0x3F, 0x70, 0x71 | ADDR1 ADDR0: 00 → 0x3E · 01 → 0x3F · 10 → 0x70 · 11 → 0x71 |
| HDC1080 | temperature and humidity sensor | 0x40 | fixed address |
| INA219 | current/voltage/power monitor | 0x40–0x4F | A1, A0: GND · VS · SDA · SCL → 0x40–0x4F |
| INA226 | current/voltage/power monitor | 0x40–0x4F | A1, A0: GND · VS · SDA · SCL → 0x40–0x4F |
| INA260 | current/voltage/power monitor with integrated shunt | 0x40–0x4F | A1, A0: GND · VS · SDA · SCL → 0x40–0x4F |
| INA3221 | 3-channel current/voltage monitor | 0x40, 0x41, 0x42, 0x43 | A0: GND → 0x40 · VS → 0x41 · SDA → 0x42 · SCL → 0x43 |
| PCA9685 | 16-channel 12-bit PWM / servo driver | 0x40–0x77 | A5…A0 → 0x40–0x77 (0x70 = All Call) |
| Si7021 | temperature and humidity sensor | 0x40 | fixed address |
| OPT3001 | ambient light sensor | 0x44, 0x45, 0x46, 0x47 | ADDR: GND → 0x44 · VDD → 0x45 · SDA → 0x46 · SCL → 0x47 |
| SHT30 / SHT31 / SHT35 | temperature and humidity sensor | 0x44, 0x45 | ADDR: GND → 0x44 · VDD → 0x45 |
| SHT40 / SHT41 / SHT43 / SHT45 (SHT4x) | temperature and humidity sensor | 0x44, 0x45, 0x46 | |
| ADS1015 | 12-bit 4-channel ADC | 0x48, 0x49, 0x4A, 0x4B | ADDR: GND → 0x48 · VDD → 0x49 · SDA → 0x4A · SCL → 0x4B |
| ADS1115 | 16-bit 4-channel ADC | 0x48, 0x49, 0x4A, 0x4B | ADDR: GND → 0x48 · VDD → 0x49 · SDA → 0x4A · SCL → 0x4B |
| ADS7830 | 8-bit 8-channel ADC | 0x48, 0x49, 0x4A, 0x4B | A1 A0 → 0x48–0x4B |
| LM75B | digital temperature sensor / thermostat | 0x48–0x4F | A2 A1 A0 → 0x48–0x4F |
| PCF8591 | 8-bit 4-channel ADC + 1 DAC | 0x48–0x4F | A2 A1 A0 → 0x48–0x4F |
| TMP102 | digital temperature sensor | 0x48, 0x49, 0x4A, 0x4B | ADD0: GND → 0x48 · V+ → 0x49 · SDA → 0x4A · SCL → 0x4B |
| TMP117 | high-accuracy digital temperature sensor | 0x48, 0x49, 0x4A, 0x4B | ADD0: GND → 0x48 · V+ → 0x49 · SDA → 0x4A · SCL → 0x4B |
| 24LC256 / 24AA256 / 24FC256 | 256-Kbit I2C EEPROM | 0x50–0x57 | A2 A1 A0 → 0x50–0x57 |
| AT24C32 | 32-Kbit I2C EEPROM | 0x50–0x57 | A2 A1 A0 → 0x50–0x57 |
| PCF85063A | real-time clock | 0x51 | fixed address |
| ENS160 | metal-oxide air quality (TVOC/eCO2/AQI) sensor | 0x52, 0x53 | ADDR: GND → 0x52 · VDD → 0x53 |
| BQ27441-G1 | single-cell Li-ion fuel gauge | 0x55 | fixed address |
| MAX30100 | pulse oximeter and heart-rate sensor | 0x57 | fixed address |
| SGP30 | VOC and eCO2 gas sensor | 0x58 | fixed address |
| SGP40 | VOC index gas sensor | 0x59 | fixed address |
| SGP41 | VOC and NOx index gas sensor | 0x59 | fixed address |
| CCS811 | eCO2 / TVOC gas sensor | 0x5A, 0x5B | ADDR: GND → 0x5A · VDD → 0x5B |
| MLX90614 | non-contact infrared thermometer | 0x5A | |
| MPR121 | 12-channel capacitive touch sensor controller | 0x5A, 0x5B, 0x5C, 0x5D | ADDR: GND → 0x5A · VDD → 0x5B · SDA → 0x5C · SCL → 0x5D |
| LPS22HB | barometric pressure sensor | 0x5C, 0x5D | SA0: GND → 0x5C · VDD → 0x5D |
| GT911 | 5-point capacitive touch screen controller | 0x5D, 0x14 | |
| MCP4725 | 12-bit DAC with EEPROM | 0x60–0x67 | A0 → 0x60/0x61 (MCP4725A0) |
| MCP4728 | 12-bit quad DAC with EEPROM | 0x60–0x67 | |
| SCD30 | NDIR CO2, temperature and humidity module | 0x61 | fixed address |
| SCD40 / SCD41 | photoacoustic CO2, temperature and humidity sensor | 0x62 | fixed address |
| BMI270 | 6-axis IMU | 0x68, 0x69 | SDO: GND → 0x68 · VDDIO → 0x69 |
| DS1307 | real-time clock | 0x68 | fixed address |
| DS3231 | temperature-compensated real-time clock | 0x68 | fixed address |
| MPU-6050 | 6-axis accelerometer + gyroscope | 0x68, 0x69 | AD0: GND → 0x68 · VDD → 0x69 |
| MPU-6886 | 6-axis IMU | 0x68, 0x69 | SA0: GND → 0x68 · VDD → 0x69 |
| MPU-9250 | 9-axis IMU (accel + gyro + AK8963 magnetometer) | 0x68, 0x69 | AD0: GND → 0x68 · VDD → 0x69 |
| SEN50 / SEN54 / SEN55 | particulate matter, VOC/NOx, temperature and humidity module | 0x69 | fixed address |
| SHTC3 | temperature and humidity sensor | 0x70 | fixed address |
| TCA9548A | 8-channel I2C multiplexer | 0x70–0x77 | A2 A1 A0 → 0x70–0x77 |
| IP5306 | power-bank charger/boost SoC, I2C-enabled variant | 0x75 | fixed address |
| BME280 | temperature, humidity and pressure sensor | 0x76, 0x77 | SDO: GND → 0x76 · VDDIO → 0x77 |
| BME680 | gas (VOC), temperature, humidity and pressure sensor | 0x76, 0x77 | SDO: GND → 0x76 · VDDIO → 0x77 |
| BME688 | AI gas, temperature, humidity and pressure sensor | 0x76, 0x77 | SDO: GND → 0x76 · VDDIO → 0x77 |
| BMP280 | pressure and temperature sensor | 0x76, 0x77 | SDO: GND → 0x76 · VDDIO → 0x77 |
| BMP388 | pressure and temperature sensor | 0x76, 0x77 | SDO: GND → 0x76 · VDDIO → 0x77 |
| MS5611-01BA | barometric pressure sensor (altimeter) | 0x76, 0x77 | CSB: VDD → 0x76 · GND → 0x77 |
| BMP180 | pressure and temperature sensor | 0x77 | fixed address |
Frequently asked questions
Why does the datasheet say 0x52 but the scanner finds 0x29?
The datasheet gives the 8-bit write address, which is the 7-bit address shifted left by one. 0x52 ÷ 2 = 0x29. Libraries and scanners use the 7-bit form.
Can two identical sensors share a bus?
Yes, if the sensor has an address pin: set it differently on each. If it doesn’t, use a TCA9548A multiplexer or a second I²C bus.
My I²C LCD is at 0x3F, not 0x27: why?
The backpack has a PCF8574AT instead of a PCF8574T. The A version uses 0x38–0x3F instead of 0x20–0x27; with all address pins high that is 0x3F instead of 0x27.
Do I need pull-ups if my modules already have them?
Usually not: one set per bus is enough. With many modules their pull-ups add up in parallel and can become too strong; the calculator above checks that.