Teacher Version
Forward Until Release
Forward Until Release
Set the compare-to value on the waitUntil command to 0, and place a box against the sensor. Then try it out.
For Virtual Robots, choose Point B as the starting point.
Virtual Robot: FwdUntilReleaseVR.rbg
Physical Robot: FwdUntilRelease.rbg
Quick Tips
When setting up the robot, have the obstacle place firmly against the Touch Sensor so that it keeps it pressed in, as shown below.
What happens?
The waitUntil control block can wait for the sensor to be released as well as pressed. The robot moves forward until the Touch Sensor is released, then stops.