Main Content

Gyro Sensor

Measure rate of rotation of gyro sensor connected to EV3 brick

Add-On Required: This feature requires the Simulink Support Package for LEGO MINDSTORMS EV3 Hardware add-on.

  • Lego Gyro Sensor block

Libraries:
Simulink Support Package for LEGO MINDSTORMS EV3 Hardware

Description

Use the Gyro Sensor block to measure the rate of rotation of gyro sensor connected to EV3 brick in degrees per second.

During simulations without hardware, this block emits zeros. See Block Produces Zeros or Does Nothing in Simulation.

Ports

Output

expand all

The block outputs the rate of rotation of a gyro sensor connected to an EV3 brick in degrees per second.

Data Types: int32

Parameters

expand all

Select the EV3 brick input port to which the gyro sensor is connected. Avoid assigning multiple devices to the same input port.

Specify the frequency of how often the block reads sensor values connected to the EV3 brick. Shorter sample times, such as 0.01, may produce unreliable measurements.

Smaller sample times require the processor to complete the same number of instructions in less time, which can cause task overruns.

Version History

Introduced in R2013a