
146 CHAPTER 12
we can introduce some random movement. Toward the end
of the improved program, Bumper-Bot2 (Figure 12-4), there
is a Random block that sends its output via a data wire to
the
Duration plug on the following Move block. This Random
block sends a value ranging from 120 to 480 to the Move
block, which uses this value to determine how many degrees
the robot should turn in place.
Download the Bumper-Bot2 program to Bumper-Bot,
and place the robot on the floor again. Run the program,
press and release the bumper, step back, and watch Bumper-
Bot perform. (As before, be ready to untangle Bumper-Bot
when necessary.) After hitting an obje ...