Inertial and Gyro Sensor#

Introduction#

The Inertial and Gyro Sensor measures the rotation and orientation of the V5 robot. The sensors can report movement along the x, y, and z axes and can be used to determine heading, rotation, and tilt. The Inertial Sensor can additionally measure its acceleration along the x, y, and z axes.

Inertial or Gyro Sensor blocks will only appear when either sensor is configured independently, not as part of a drivetrain configuration, in the Devices window.

Below is a list of available blocks:

Inertial acceleration#

The Inertial acceleration block returns the current acceleration value from one of the Inertial Sensor’s axes from -4.0 to 4.0 Gs.

Note: This block is only available for Inertial Sensors.

([Inertial 1 v] aceleración de [incógnita v] eje en g)

Parameter

Description

device

The Inertial Sensor to use, configured in the Devices window.

axis

The axis to measure acceleration on:

  • x
  • y
  • z

Inertial gyro rate#

The Inertial gyro rate block returns the rate of rotation around one of the Inertial Sensor’s axes in dps (degrees per second).

Note: This block is only available for Inertial Sensors.

([Inertial 1 v] velocidad de giro de [incógnita v] eje en dps)

Parameter

Description

device

The Inertial Sensor to use, configured in the Devices window.

axis

The axis to measure the gyro rate for:

  • x
  • y
  • z

Inertial orientation#

The Inertial orientation block returns the roll, pitch, or yaw of the Inertial Sensor in degrees.

Note: This block is only available for Inertial Sensors.

([Inertial 1 v] orientación de [rollo v] en grados)

Parameter

Description

device

The Inertial Sensor to use, configured in the Devices window.

angle

The orientation to measure:

  • roll
  • pitch
  • yaw

calibrate Inertial/Gyro#

The calibrate Inertial/Gyro block calibrates the configured Inertial or Gyro Sensor. All subsequent blocks will wait for the calibration to complete before executing. Calibration is an internal procedure that measures and compensates for sensor noise and drift over a specified period. During this time, the sensor must remain completely still (i.e., on a stable surface without any external movement). Movement during calibration will produce inaccurate results.

calibrar [Inertial 1 v]

Parameter

Description

device

The Inertial or Gyro Sensor to use, configured in the Devices window.

set Inertial/Gyro heading#

The set Inertial/Gyro heading block sets the Inertial or Gyro Sensor’s current heading to a specified value.

aria-description goes here#
Establecer el rumbo [Inertial 1 v] a [0] grado

Parameters

Description

device

The Inertial or Gyro Sensor to use, configured in the Devices window.

heading

The heading value to assign, in degrees.

set Inertial/Gyro rotation#

The set Inertial/Gyro rotation block sets the Inertial or Gyro Sensor’s current cumulative rotation value.

aria-description goes here#
Establezca la rotación [Inertial 1 v] a [0] grado

Parameters

Description

device

The Inertial or Gyro Sensor to use, configured in the Devices window.

rotation

The cumulative rotation value to assign, in degrees.

Inertial/Gyro heading#

The Inertial/Gyro heading block returns the Inertial or Gyro Sensor heading angle as a decimal number, in the range 0 to 359.99 degrees.

([Inertial 1 v] rumbo en grados)

Parameters

Description

device

The Inertial or Gyro Sensor to use, configured in the Devices window.

Inertial/Gyro rotation#

The Inertial/Gyro rotation block returns how much the Inertial or Gyro Sensor has rotated since the project started, in degrees: positive for clockwise, negative for counterclockwise.

([Inertial 1 v] rotación en grados)

Parameters

Description

device

The Inertial or Gyro Sensor to use, configured in the Devices window.