Chapter 9. Modifying the Robot to React to Edges and Lines
This chapter covers techniques that enable your robot to use sensors to gain awareness of its environment. Using reflectance sensors, the robot will gain the ability to follow lines or to avoid falling off the edge of the surface it is on. Information from the sensors is abstracted so that the robot logic has a single consistent interface and can easily be enhanced to support other sensors. The physical mounting of the sensors varies with different platforms: see Chapter 4, Building the Four-Wheeled Mobile Platform if you have the 4WD chassis, Chapter 3, Building the Two-Wheeled Mobile Platform if you have the 2WD chassis.
Two reflectance sensors are used for edge detection and a third is needed for line following. Although you can use the stripboard mount (for the three line following sensors) discussed in Chapter 2 to experiment with edge detection, the robot will perform the edge detection task best with the sensors further apart (the stripboard approach is best for line following). If the sensors are close together, the robot can have difficulty determining the best angle to turn when an edge is encountered.
See Chapter 3, Building the Two-Wheeled Mobile Platform for details of mounting these sensors on the 2WD chassis and Chapter 4, Building the Four-Wheeled Mobile Platform for the 4WD chassis. The principles of reflectance sensors are covered in Infrared Reflectance Sensors in Chapter 8, Tutorial: ...