Thursday, June 3, 2010

Your Robot Follows Commands in a Sequence

How is this:

to drive
beep
ab, on
wait 30
ab, off
end
different from this?
to drive
ab, on
wait 30
ab, off
beep
end
The first procedure beeps, turns motors a and b on, waits 3 seconds, and turns motors a and b off. The second procedure beeps after the motors turn on and off.

What is the rule the Cricket is following?
The Cricket will follow the sequence of commands from the top of the procedure to the bottom.

No comments: