Sensing Distances to Detect Objects with Pico
Our robot is starting to move around independently. We spent the last chapter preparing mount points to add sensors, including distance sensors. We can use these sensors to detect how far objects are from the robot, and by adding more than one, we can see which direction is closest. This sense will allow the robot to respond to the real world and drive around a room without much manual control.
In this chapter, we will learn more about these sensors and their limitations. Then, we will attach the sensors to the robot and learn more about the communication protocol used to talk to them. Next, we will wire the sensors into Raspberry Pi Pico and get data. Finally, we will tie multiple sensors together with motor control to make the robot avoid obstacles while driving.
In this chapter, we’re going to cover the following main topics:
- How distance sensing works
- Soldering headers and attaching them to the robot
- An...