In order for a robot to detect barriers, a
robot must be programmed to access the infrared light sensor. To
be able to sense the obstruction, the infrared sensor must blink
constantly. The infrared light will reflect off of any object,
the robot will sense this, and change direction accordingly.
This prevents the robot from running into things, which is the case
with a touch sensor.