ESP32 Bit Pirate home
  • I2C
  • Beginner
  • 5 min
  • Register read

Recipe · Beginner · I2C

How to read I2C registers

After an I2C scan finds an address, the next useful step is reading a known register or a small register window.

I2C bus with SDA and SCL signal lines.
Scan tells you who answers. Register reads tell you whether the device behaves like the part you expect.

Wiring View

I2C device BP SDAI2C SDASCLI2C SCLVCC3.3V or support...GNDGND
Generated from the wiring summary: I2C device to BP.
Step 1

Commands

Use the scan result as the address. Replace 0x68 and 0x00 with the address and register from your device datasheet.

Result

What it means

A stable value from a documented register means the address, wiring and register transaction are plausible.

Troubleshooting

  • Using an 8-bit datasheet address instead of the 7-bit scan address.
  • Reading a register that requires a page select first.
  • Missing pull-ups or target board holding the bus.
  • Wrong voltage level for the module.

Next steps

  • Use regs <addr> 16 for a short register window.
  • Use identify <addr> if the firmware has a helper for that family.
  • Move to writes only after confirming the register map.

I2C register read FAQ

Should I use the scan address or the datasheet address?

Use the 7-bit address reported by scan. Many datasheets show 8-bit read and write addresses, which are shifted versions of the 7-bit bus address and can cause confusing read failures.

What does a register read assume about the device?

It assumes the address, register pointer size, page state and read length match the target datasheet. A scan only proves the bus address; it does not describe the register model.

Is it safe to read registers on an unknown I2C device?

Simple reads are usually lower risk than writes, but use a stable supply and known address first. Avoid write commands until you understand whether registers control calibration, flash, security or power state.

Go deeper