Ev3GyroSensor
Last Updated On 2021-07-16
Version 2MinSDK 7Tutorial Video
A component that provides a high-level interface to a gyro 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.
- Mode - it's a lego ev3 gyro sensor mode value which is set to angle by default.
- SensorPort - it's a lego ev3 sensor port value which is set to 1 by default.
- SensorValueChangedEventEnabled - it's a boolean value which is set to false 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.
Mode
Specifies the mode of the sensor.
SensorValueChangedEventEnabled
Whether the SensorValueChanged event should fire when the sensor value changed.
Methods
You can set the below method blocks in the blocks section of the builder.
GetSensorValue
Returns the current angle or rotation speed based on current mode, or -1 if the value cannot be read from sensor.
SetAngleMode
Measures the orientation of the sensor.
SetRateMode
Measures the angular velocity of the sensor.
Events
You can set the below event blocks in the blocks section of the builder.
SensorValueChanged
Called then the sensor value changed.