4 · Displays & buses
Scan the I²C bus
Advanced15 min
Goal
List the addresses of the devices present on the bus.
Why it matters
The first troubleshooting reflex: knowing who actually answers on the bus.
Steps
- 01Place several I²C components on the canvas.
- 02Sweep addresses 1 to 126 with a for loop.
- 03Test each address with beginTransmission()/endTransmission().
- 04Print those answering 0.
This tutorial runs inside the Circuitly simulator: your wiring and your code are checked automatically at every step.