Choosing device types
We will add other sensors and Bluetooth to communicate with our robot. We will look in depth at each in later chapters, but we should know enough to consider which we will buy. This section will involve taking a brief overview, making some trade-offs, and choosing the parts to use.
Distance sensors
Distance sensors, briefly mentioned in Chapter 1, let the robot sense its situation and surroundings to avoid or follow obstacles. Some kinds only return if a distance has crossed a threshold, but the more suitable types return a sensed distance value. We will focus on this latter type.
Most distance sensors bounce a beam from objects and measure their return time or angle to determine the distance. For example, clap opposite a wall in a large open space, and you will hear how long your echo takes to return. If you move further from the wall, the return time will be longer.
These fall into two major categories: sound-based and light-based. Each has pros...