Introduction to I2C communication
You encountered I2C communication in earlier chapters. Chapter 1, discussed how I2C is a data bus that carries address information, allowing a primary device such as Raspberry Pi Pico to reach multiple devices on a single bus. We learned then that Raspberry Pi Pico has two hardware I2C buses. I2C (or I2C) is an acronym for Inter-Integrated Circuit.
In Chapter 7, Planning and Shopping for More Devices, we saw how we would be using I2C devices both for VL53L1X distance sensors along with an IMU.
How exactly does this bus work? Chapter 1, also mentioned that I2C has two wires – a Serial Clock line (SCL) and a Serial Data line (SDA). The following picture shows how devices send signals through them:
Figure 8.4 – I2C signals on the wire
The preceding diagram shows two graphs representing I2C signals. The horizontal axis is time, and the vertical axis when high is logic one, with low being logic zero. As shown...