ProtocolsQUICK REFERENCE
I2C
Two shared signal lines, device addresses and compatible pull-ups.
01Bus wiring
- Signals
- SDA = data; SCL = clock. Connect matching lines plus common ground.
- Pull-ups
- Both lines need pull-ups to a compatible logic rail; 4.7 kohm is a common short-bus starting point.
- Addressing
- Most devices use 7-bit addresses. Duplicate fixed addresses need a mux or separate bus.
02Board examples
- Uno / Nano
- SDA A4, SCL A5; Arduino: Wire.begin().
- Classic ESP32
- Example SDA 21, SCL 22; Arduino: Wire.begin(21, 22).
- Pico MicroPython
- I2C(0, sda=Pin(4), scl=Pin(5), freq=100000).
03Bring-up
- Scan first
- Start at 100 kHz; scan addresses and compare with the device datasheet.
- Multiple boards
- Parallel breakout pull-ups reduce total resistance; check the combined value.
- Debug
- Idle SDA and SCL should be HIGH. Check power, ground, address and stuck-low lines.