Problem from student activity sheets:
Build the Table Bumper on page 90
of the Constructopedia. Attach it to Roverbot so that when it’s placed
on a table, the bumper wheels touch the table (and the touch sensors are
released). Write a program to make Roverbot move on the table and avoid
falling off the edge.
Important note: As
you try it out be sure to be prepared to catch Roverbot.
Note that the building directions in the Constructopedia are not
detailed step-by-step, but the picture is clear enough. The challenge
here is to write a program to have Roverbot move on a table and stop at
the edge. When the bumper “feelers” go over the edge, the touch sensor
sample solutions for the “Don’t fall off the table!” problem:
Note: When a person is
told to keep going until he or she hits something, it is obvious that he
or she must then stop. That is not the case with a robot. In the
programs Don’tFall3 and Don’tFall4, the instruction is to keep moving
while or until the sensor is pressed. An explicit instruction is then
needed to tell it what to do next. It is not obvious to a robot that the
best next move is to turn off the motors and stop.