0% found this document useful (0 votes)
264 views2 pages

Touch Sensor

The document discusses using a touch sensor on a Lego Mindstorms EV3 robot. It explains that the touch sensor can detect when it is pressed or released and be used to start actions, detect obstacles, or check if an object is being gripped. It provides examples of using the touch sensor in wait blocks to program the robot to wait until the sensor is pressed, released, or bumped before continuing. Tasks demonstrate programming the robot to wait for the sensor to be pressed before moving and to wait for it to be released before moving. A final task involves programming a press-go-press-stop sequence.

Uploaded by

api-278314002
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
264 views2 pages

Touch Sensor

The document discusses using a touch sensor on a Lego Mindstorms EV3 robot. It explains that the touch sensor can detect when it is pressed or released and be used to start actions, detect obstacles, or check if an object is being gripped. It provides examples of using the touch sensor in wait blocks to program the robot to wait until the sensor is pressed, released, or bumped before continuing. Tasks demonstrate programming the robot to wait for the sensor to be pressed before moving and to wait for it to be released before moving. A final task involves programming a press-go-press-stop sequence.

Uploaded by

api-278314002
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Touch Sensor

1. What will you learn in this lesson?


1.1. Using touch sensor
1.2. How to work with touch sensor

2. Explanation

The Touch sensor for Lego Mindstorms EV3 robots detects


when it is pressed or released. It can be used as a button to
start an action from the robot, can detect when a mobile robot
touches an obstacle to avoid it or can tell if the robot has something in its gripper.

We can either measure or compare the state oft he sensor

We can choose to use the Touch sensor in all Flow blocks – Wait, Loop and Switch

This is an example of using Touch Sensor


in Wait block. Sensor has 3 states:

 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

Build aprogram for the Touch sensor for Press-Go-Press-Stop

There are 2 possible solutions:

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.

You might also like