gyroSensor
Connection to gyroscopic sensor
Add-On Required: This feature requires the MATLAB Support Package for LEGO MINDSTORMS EV3 Hardware add-on.
Description
This object represents a connection to a single-axis EV3 Gyro Sensor (item number 45505). To measure total rotation or rate of rotation, use this object with the functions listed in Object Functions.
Creation
Description
creates a connection to a gyroscopic sensor. You can use this connection with the
functions listed in Object Functions to measure the rotation rate or
rotation angle of the sensor, and reset the rotation rate measurement to zero.mygyrosensor
= gyroSensor(myev3
)
If multiple gyroscopic sensors are attached to the EV3 brick, this function chooses the sensor that is attached to the EV3 input port with the lowest number.
creates a connection to a gyroscopic sensor that uses a specific EV3 input port by the
InputPort
property.mygyrosensor
= gyroSensor(myev3
,inputport
)
Input Arguments
Output Arguments
Properties
Object Functions
readRotationAngle | Read rotation angle from gyroscopic sensor |
readRotationRate | Read rotation rate from gyroscopic sensor |
resetRotationAngle | Reset rotation angle to zero |