❌ ❌ ❌ ❌ ❌ ❌ ✅

Touch Sensor

../_images/ev3device-touch.png
S1touch sensoron
class TouchSensor(port)

LEGO® MINDSTORMS® EV3 Touch Sensor.

Parameters:

port (Port) – Port to which the sensor is connected.

touch sensorpressed
touch sensorreleased
pressed() → bool

Checks if the sensor is pressed.

Returns:

True if the sensor is pressed, False if it is not pressed.