Exercises
You can use these exercises to practice more of the concepts learned in this chapter:
- Could you write code to follow an object at a fixed distance? If it’s further away, could you drive it forward, and if it’s too close, back it up a little?
- Try different materials in front of the robot, such as glass, black fabric, thin paper, and thick paper. Observe which are detected and how they affect the distance detected. For example, what happens if you aim the robot at a mirror?
- Try observing the distance measurements in different light conditions, such as room light, darkness, and full sunlight.