Fundamentals/I2C/Addresses
Chapter · I2C

Addresses

Every module has a number. How the ESP32 uses it, how to find every number on a bus, and what happens when two modules share one.

  1. 04Addresses4 minEvery chip on an I2C bus has a seven-bit number, its address, and the controller puts it at the front of every message. The chip with that number answers and every other chip lets the message go by.
  2. 05Scanning the bus4 minA scan calls every address from 0x08 to 0x77 and listens on the ninth clock of each, where a chip that heard its own address pulls SDA low. It is the first thing to run when a module does not answer.
  3. 06Two chips, one address4 minTwo chips at one address both answer, at the same moment, on one wire. The scan shows one device, and every read returns a number built from both, with no error anywhere to say so.

Start at 04 and read down — the order is the order things get easier in. Or take the one with your part in it; every article stands on its own, and links back to whatever it needs.