Ev3TouchSensor

Last Updated On 2021-07-16

Version 1MinSDK 7Tutorial Video

A component that provides a high-level interface to a touch sensor on a LEGO MINDSTORMS EV3 robot.


Properties

You can set the below properties in the UI part of the builder.

  • BluetoothClient - it's a BluetoothClient value which is set to blank by default.
  • PressedEventEnabled - it's a boolean value which is set to false by default.
  • ReleasedEventEnabled - it's a boolean value which is set to false by default.
  • SensorPort - it's a lego ev3 sensor port value which is set to 1 by default.

Block Properties

You can set the below blocks properties in the blocks section of the builder.

BluetoothClient

The BluetoothClient component that should be used for communication.


PressedEventEnabled

Specifies whether the Pressed event should fire when the touch sensor is pressed.


ReleasedEventEnabled

Whether the Released event should fire when the touch sensor is released.



Methods

You can set the below method blocks in the blocks section of the builder.

IsPressed

Returns true if the touch sensor is pressed.


Events

You can set the below event blocks in the blocks section of the builder.

Pressed

Called when the touch sensor is pressed.

Released

Called when the touch sensor is pressed.