In Chapter 16, Servo Motors, we saw how we could use a servo motor to open and close a robotic claw; however, a servo motor can do so much more than that. With a servo motor, as we saw with the robotic claw, we can rotate the motor to a specific angle. In the past, I have attached a MaxSonar Range Finder to a servo motor and pointed the sensor straight ahead. Then when the rangefinder detected an object in front of the robot, the servo would turn the rangefinder in different directions, so it could determine the best direction to move in. This enabled me to build an autonomous robot, with obstacle avoidance, using only a single rangefinder.
We could also attach a light source to a servo motor to make a rotating searchlight that will enable you to see where the robot is in the dark, or equally it is just a really cool addition to your robot with really no functional...