Communicating with a single distance sensor
Each distance sensor requires only four wires; however, we will also improve the power system. We will then get into the code needed to read data from a system.
Wiring the distance sensors
We start our wiring by looking at a block diagram of our robot, as we saw previously in Chapter 7. Look at the following diagram:
Figure 8.5 – The robot block diagram with distance sensors
The preceding diagram shows the robot block diagram with the additional VL53L1x distance sensors connected via I2C to Raspberry Pi Pico. The new parts have a thick double outline.
We need the schematic to get into the details of the connections, as shown in the following figure:
Figure 8.6 – The schematic with distance sensors
In the preceding figure, I’ve shown a close-up schematic of the distance sensors connected to Raspberry Pi Pico. We connect a sensor to each I2C bus, along with 3v3...