60 SERVO 10.2013
FIGURE 1. The ArdBot II, with
front bumper switches, ready
to set out into a cruel and
By Gordon McComb
Robots use sensors to know what's happening around them. Sensors don't have to be
expensive or complicated to provide your bot with a rich overview of its world. A robot can
perform a remarkable amount of work with just the sense of touch from a $2 switch.
This month, we'll learn about interfacing switches to your Arduino robot, along with
how to use the information these sensors provide to interactively command a robot's motors.
This is a critical and fundamental building block of most any autonomous robot. Once you
learn how to use a switch, you can apply the same techniques to many other types of sensors,
Take note: In the previous installments of this series, I mentioned certain accessories —
like the front leaf switches and piezo speaker — are optional. In this article, I'll present some
Arduino sketches that make use of these options. In order to enjoy the full benefit of the
sketches presented here, you'll need to have these options installed on your ArdBot II.