Touch Sensor

The FTC touch sensor is simple but effective. It detects whether the sensor has been pressed or not. When it button has been depressed a circuit is completed, registering it as a touch.

The range sensor is used for obstacle avoidance and as a limit switch. When attached to the outside of the robot, when the touch sensor detects a touch, you know the robot has collided with something and should reverse. Limit switches are devices used to prevent robot parts from moving beyond a certain point. For example, if your robot has a robotic arm, you don’t want the robot arm dragging on the ground. To ensure that doesn’t happen you install a touch sensor at certain joints. If the arm has moved below a certain point, it will touch the touch sensor and signal that the arm has been depressed too far. An automated response can then be sent to raise the arm back up to a safe level.

Programming using the sensor is easy. Simply use the block getDistance

to determine the distance of the closest object in front of the distance sensor. You can select the units the distance is recorded in.

Here is how the touch sensor can be used for touch avoidance.

Create a simple logic statement:

Then when collision is detected, reverse the robot by reverse motor power for 1 second.

Put this within a for loop for continuous detection.

And there you have an anti collision algorithm!

Touch sensors can prove to be useful in certain situations. Be creative!