I2C module addresses
The default address, which others can be set and how. The board tester finds the address of your own module without a table: it scans the whole bus.
Modules and their addresses
The table lists 47 modules.
| Address | Module | How to change the address |
|---|---|---|
| 0x270x20-0x27 | LCD1602 and LCD2004 with an I2C adapterPCF8574T, 16×2 or 20×4 display | Jumpers A0, A1, A2 on the adapter: a soldered jumper sets the bit to 0, all open gives 0x27.NXP PCF8574/PCF8574A, addressing section |
| 0x3F0x38-0x3F | LCD1602 with a PCF8574AT adapterPCF8574AT, 16×2 or 20×4 display | The same A0-A2 jumpers, addresses 0x38-0x3F. The chip fitted is visible from the marking on the package.NXP PCF8574/PCF8574A, addressing section |
| 0x3C0x3D | OLED 0.96″ and 0.91″SSD1306, 128×64 and 128×32 display | A resistor on the back (marked 0x78/0x7A): moving it to the other pad gives 0x3D. The board shows the 8-bit address, 0x78 is 0x3C.Solomon Systech SSD1306, SA0 pin |
| 0x3C0x3D | OLED 1,3″SH1106, 128×64 display | The address resistor is on the back, like on the SSD1306.Sino Wealth SH1106, SA0 pin |
| 0x680x69 | GY-521MPU-6050, accelerometer and gyroscope | AD0 pin: 0x68 on GND or floating, 0x69 on VCC.InvenSense MPU-6000/6050 Product Specification, AD0 |
| 0x68 | DS3231 clock (ZS-042)DS3231, real-time clock | The clock address does not change. The ZS-042 module also has an AT24C32 EEPROM at 0x57, and the A0-A2 jumpers give 0x50-0x57.Analog Devices (Maxim) DS3231 |
| 0x68 | DS1307 clock (Tiny RTC)DS1307, real-time clock | The address does not change. The Tiny RTC module also has an AT24C32 EEPROM at 0x50.Analog Devices (Maxim) DS1307 |
| 0x51 | PCF8563 clockPCF8563, real-time clock | The address does not change.NXP PCF8563 |
| 0x500x50-0x57 | EEPROM AT24C32, AT24C256AT24Cxx, 4-32 KB memory | Pins A0-A2: 0x50 on GND, each one on VCC adds 1, 2 or 4.Microchip AT24C32D, AT24C256C |
| 0x760x77 | GY-BME280 and GY-BMP280BME280, BMP280, pressure, temperature, humidity (BME) | SDO pin: 0x76 on GND, 0x77 on VCC. On 4-pin boards there is a jumper on the back.Bosch BME280 and BMP280 datasheet, I2C section |
| 0x760x77 | BME680, BME688, BMP388, BMP390Bosch, pressure, gas, temperature | SDO pin: 0x76 on GND, 0x77 on VCC. The Adafruit board defaults to 0x77.Bosch BME680, BMP388 datasheet |
| 0x77 | GY-68 (BMP180)BMP180, pressure and temperature | The address does not change.Bosch BMP180 datasheet |
| 0x400x40-0x77 | 16-channel servo driverPCA9685, 16 PWM channels | Six jumpers A0-A5 on the board, a soldered one adds its bit to 0x40: A0 gives 1, A5 gives 32. Address 0x70 is taken after power-up by the all-call of every PCA9685 (ALLCALL), so do not use it.NXP PCA9685, section 7.1 |
| 0x480x49, 0x4A, 0x4B | ADS1115 and ADS1015ADS1115, 16-bit ADC, 4 channels | ADDR pin: 0x48 on GND, 0x49 on VDD, 0x4A on SDA, 0x4B on SCL.TI ADS111x, table 4 |
| 0x400x40-0x4F | INA219INA219, current and voltage | Pins A0 and A1 (GND, VS+, SDA, SCL): 16 addresses. Modules have A0 and A1 jumpers.TI INA219, table 1 |
| 0x400x40-0x4F | INA226INA226, current and voltage | Pins A0 and A1, same as the INA219.TI INA226, table 6 |
| 0x29 | GY-VL53L0XV2VL53L0X, laser rangefinder | The address is changed only by a command after power-up and resets when the power goes off. Several sensors are enabled one by one with the XSHUT pin and each gets its own address.ST VL53L0X datasheet, API setDeviceAddress |
| 0x29 | VL53L1XVL53L1X, laser rangefinder up to 4 m | Same as the VL53L0X: the address is set by a command through XSHUT.ST VL53L1X datasheet |
| 0x230x5C | GY-302 (BH1750)BH1750, light level | ADDR pin: 0x23 on GND, 0x5C on VCC.ROHM BH1750FVI |
| 0x36 | AS5600 angle sensorAS5600, magnetic encoder | The address does not change (on the AS5600L it can be changed by a command).ams OSRAM AS5600 |
| 0x36 | MAX17048MAX17048, LiPo charge level | The address does not change.Analog Devices (Maxim) MAX17048 |
| 0x0D | GY-271 (QMC5883L)QMC5883L, compass | The address does not change. GY-271 boards come with a QMC5883L or an HMC5883L (0x1E): the chip is visible from its marking, and the HMC5883L library does not work with the QMC5883L.QST QMC5883L |
| 0x1E | HMC5883LHMC5883L, compass | The address does not change.Honeywell HMC5883L |
| 0x380x39 | AHT20 and AHT10AHT20, temperature and humidity | The AHT20 address does not change. On the AHT10 the ADDR pin gives 0x39.Aosong AHT20 and AHT10 datasheet |
| 0x440x45 | SHT31, SHT30SHT3x, temperature and humidity | ADDR pin: 0x44 on GND, 0x45 on VDD.Sensirion SHT3x-DIS |
| 0x440x45, 0x46 | SHT40, SHT41, SHT45SHT4x, temperature and humidity | The address is fixed in the chip: SHT40-AD1B 0x44, BD1B 0x45, CD1B 0x46.Sensirion SHT4x |
| 0x40 | HTU21D, Si7021HTU21D, temperature and humidity | The address does not change.TE HTU21D, Silicon Labs Si7021 |
| 0x200x20-0x27 | MCP23017 expanderMCP23017, 16 GPIO | Pins A0-A2: 8 addresses.Microchip MCP23017 |
| 0x200x20-0x27 | PCF8574 expanderPCF8574, 8 GPIO | Pins A0-A2. The PCF8574A uses addresses 0x38-0x3F.NXP PCF8574/PCF8574A |
| 0x600x60-0x67 | MCP4725 DACMCP4725, 12-bit DAC | The A0 pin gives 0x60 or 0x61, the upper bits are fixed in the chip (letter A0, A1, A2 in the marking). Adafruit and many clones use 0x62 and 0x63.Microchip MCP4725, section 7.2 |
| 0x700x70-0x77 | TCA9548A multiplexerTCA9548A, 8 separate I2C buses | Pins A0-A2. Use it when two modules share an address: each goes on its own channel.TI TCA9548A |
| 0x700x70-0x77 | HT16K33 matrices and displaysHT16K33, LED displays | Jumpers A0-A2.Holtek HT16K33 |
| 0x57 | MAX30102MAX30102, pulse and oxygen | The address does not change.Analog Devices (Maxim) MAX30102 |
| 0x39 | APDS-9960APDS-9960, gestures, colour, proximity | The address does not change.Broadcom APDS-9960 |
| 0x5A0x5B | CCS811CCS811, air quality | ADDR pin: 0x5A on GND, 0x5B on VDD.ScioSense CCS811 |
| 0x58 | SGP30SGP30, air quality | The address does not change.Sensirion SGP30 |
| 0x62 | SCD40, SCD41SCD4x, CO2 | The address does not change.Sensirion SCD4x |
| 0x5A | MLX90614MLX90614, contactless thermometer | The address is stored in the sensor memory and changed by a write command.Melexis MLX90614 |
| 0x530x1D | ADXL345ADXL345, accelerometer | SDO/ALT ADDRESS pin: 0x53 on GND, 0x1D on VCC.Analog Devices ADXL345 |
| 0x180x19 | LIS3DHLIS3DH, accelerometer | SDO/SA0 pin: 0x18 on GND, 0x19 on VCC.ST LIS3DH |
| 0x280x29 | BNO055BNO055, orientation in space | COM3 pin: low level 0x28, high level 0x29.Bosch BNO055 |
| 0x680x69 | MPU-9250, ICM-20948InvenSense, 9 axes | AD0 pin: 0x68 on GND, 0x69 on VCC.InvenSense MPU-9250, ICM-20948 |
| 0x480x48-0x4F | LM75 and TMP102 temperature sensorLM75, temperature | The LM75 has pins A0-A2 (0x48-0x4F), the TMP102 has pin ADD0 (0x48-0x4B).TI LM75B, TMP102 |
| 0x10 | VEML7700VEML7700, light level | The address does not change.Vishay VEML7700 |
| 0x38 | FT6206 and FT6236 touch controllerFT6x06, capacitive touch controller | The address does not change.FocalTech FT6x06 |
| 0x5D0x14 | GT911 touch controllerGT911, capacitive touch controller | Selected by the level on INT at reset: 0x5D or 0x14.Goodix GT911 Programming Guide |
| 0x52 | Wii Nunchuk joystickNunchuk, joystick and buttons | The address does not change.Nunchuk protocol description (wiibrew.org) |
One address, several modules
Every module on a bus needs its own address. If two modules answer to the same one, change the address of one of them with a jumper or add a TCA9548A multiplexer.
| Address | Modules at the default address |
|---|---|
| 0x20 | MCP23017 expander, PCF8574 expander |
| 0x29 | GY-VL53L0XV2, VL53L1X |
| 0x36 | AS5600 angle sensor, MAX17048 |
| 0x38 | AHT20 and AHT10, FT6206 and FT6236 touch controller |
| 0x3C | OLED 0.96″ and 0.91″, OLED 1,3″ |
| 0x40 | 16-channel servo driver, INA219, INA226, HTU21D, Si7021 |
| 0x44 | SHT31, SHT30, SHT40, SHT41, SHT45 |
| 0x48 | ADS1115 and ADS1015, LM75 and TMP102 temperature sensor |
| 0x5A | CCS811, MLX90614 |
| 0x68 | GY-521, DS3231 clock (ZS-042), DS1307 clock (Tiny RTC), MPU-9250, ICM-20948 |
| 0x70 | TCA9548A multiplexer, HT16K33 matrices and displays |
| 0x76 | GY-BME280 and GY-BMP280, BME680, BME688, BMP388, BMP390 |
How to read the address table
The address in the table is seven-bit; it is what you write in Wire.beginTransmission, in a library constructor and what you see in an I2C scanner. Boards and datasheets sometimes use the eight-bit form: the address shifted left by one bit. 0x78 on the back of an OLED means 0x3C, 0x4E on an LCD adapter means 0x27. The search understands both forms.
On one bus each module must have its own address. A second address is set with a jumper or a module pin (AD0, SDO, ADDR, A0-A2): a soldered jumper or a pin tied to GND or to VCC gives different addresses. If a module has only one address, use a TCA9548A multiplexer: it provides eight separate buses.
Examples
- An LCD1602 doesn't answer at 0x27. The adapter has a PCF8574AT chip, whose addresses are 0x38-0x3F, 0x3F by default.
- An MPU-6050 and a DS3231 clock on one bus: both are at 0x68. Connect the sensor's AD0 pin to VCC, the sensor moves to 0x69, and in code you write mpu.begin(0x69).
- On a ZS-042 clock module the scanner finds two addresses: 0x68 for the DS3231 and 0x57 for the AT24C32 memory on the same board.
Common mistakes
- People take the address from a sticker or a shop description. Check with a scanner: modules that look identical have different chips.
- People put five modules with 4.7 kΩ pull-ups each on one bus. The pull-ups end up in parallel, about 940 Ω together, and at 3.3 V the output has to sink 3.5 mA. According to the I2C standard (NXP UM10204) an output in standard mode must sink 3 mA. Desolder the extra pull-ups on the modules.
FAQ
- How do I find the I2C address of my module?
- Run an I2C scanner: it polls addresses 0x08-0x77 and prints those where a module answered. The tester on this site has a scanner, and the firmware is uploaded from the browser, so you don't need to write a sketch.
- What is the address of an LCD1602 with I2C?
- 0x27 for an adapter on a PCF8574T and 0x3F for an adapter on a PCF8574AT. With the A0-A2 jumpers the address changes within 0x20-0x27 or 0x38-0x3F.
- What is the address of a 0.96" OLED on an SSD1306?
- 0x3C. Moving the address resistor on the back gives 0x3D. The marking 0x78 on the board means the same 0x3C in eight-bit form.
- What should I do if two modules have the same address?
- Change the address of one of them with a jumper, if it has one (table above). If the address can't be changed, as on the DS3231, AS5600 or BMP180, use a TCA9548A multiplexer or move the module to a second I2C bus: the ESP32 has two, and so does the Raspberry Pi Pico.
- Are TM1637 and WS2812 I2C too?
- No. The TM1637 has its own protocol on two wires, CLK and DIO, without addresses, and the scanner doesn't find it. The WS2812 works over a single data wire.