Repeat Until Touch Sensor
Set the Loop's mode to Touch Sensor instead of Distance Sensor. Make sure the arm is raised on the robot.
The robot will check the Touch Sensor instead of the Distance Sensor
at the beginning of the Loop to see whether it will send Flow in or leave the Loop.
If the Touch Sensor is being pressed in at the time the Loop begins, the robot will stop! If not, it will move forward and backward as intended until the Touch Sensor is pressed. |