
| Touch sensors are programmed to detect when their buttons have been pushed in or released. You need to specify which sensor port a touch sensor is connected to. This icon causes the program to wait forever until the touch sensor on port 1 has been pushed in. |
![]() |
![]() |
This icon waits until the touch sensor has been released. |
|
Touch sensors can be used to control the motors. This
program waits forever until the touch sensor has been pushed in. When
this happens, motor A is commanded to turn on. Motor A continues to run
until the touch sensor has been released, and motor A is commanded to
stop.
|
|
![]() |
The touch sensor fork |
| In this program, if the touch sensor is pushed in, then motor A is turned on and motor C is commanded to stop. If the touch sensor is released, then motor C is turned on and motor A is stopped. Remember that a fork statement needs a fork merge at the end of the decision. |