Touch Sensor
Touch Sensor
2. Explanation
We can choose to use the Touch sensor in all Flow blocks – Wait, Loop and Switch
Released (0)
Pressed (1)
Bumped (2)
Task 1
Using the „Pressed“ state you can program the robot to wait until the sensor is pressed. It is
useful for detecting objects near the robot and acting upon it.
The robot moves forward. It stops when the Touch sensor is pressed.
Task 2
Using the „Released“ state you can program the robot to wait until the sensor is released.
The robot stays in place. The Touch sensor is pressed. The moment you release the Touch
sensor the robot moves forward for one second.
Task 3
Using the „Bumped“ state you can program the robot to wait until the sensor is pressed and
then released. Only then the robot will move forward.
Task 4
1) When you press the sensor, wait for 1 second and only then the motors start to
move. After another pressing the motors stop.
2) When you press the sensor, then release it, the motors start to move. After another
pressing the motors stop. In this case you don’t need to loose 1 second.