Summary
Now that you know how to use sensors to understand the environment, you can create even more complex programs that will sense these barriers and then change the direction of your robot to avoid them or collide with them. You learned how to find distance using sonar sensors and how to connect them to Arduino. You also learned about IR sensors and how they can be used with Arduino.
In the next chapter, you'll learn how to add even more interesting sensors, such as a digital compass, so that you can plan your travel routes even more efficiently.