Sensor de rotación#

Introducción#

The Rotation Sensor measures the rotation of a shaft. It can be used anywhere on a robot where a shaft is rotating, even if that shaft is not connected directly to a motor.

A motor has a built-in encoder that can track its own rotation. The Rotation Sensor works like an external encoder that can track the rotation of a separate shaft.

The Rotation Sensor can report the shaft’s angle, position, and velocity. Angle is the shaft’s absolute position from 0 to 359.99 degrees. It does not reset when a project starts or when the robot is powered off. Position tracks how many degrees or turns the shaft has rotated forward or reverse during a project, and it can be reset as needed.

The Rotation Sensor is compatible with 1/8 inch and 1/4 inch standard VEX shafts.

El sensor de rotación VEX.

A continuación se muestra una lista de los bloques disponibles:

set Rotation position#

The set Rotation position stack block sets the Rotation Sensor’s current position to a value in degrees.

Position is how far the shaft has rotated during a project. Setting the position changes the current position value without moving the shaft.

Establezca la posición [Rotation 1 v] a [0] grado

Parámetros

Descripción

dispositivo

The Rotation Sensor to use. Choose from the Rotation Sensors configured in the Devices window.

posición

The position value to assign to the Rotation Sensor, in degrees. This can be an integer or a decimal.

Rotation angle#

The Rotation angle reporter block reports the shaft’s current angle from 0 to 359.99 degrees.

Angle reports the shaft’s absolute position within one rotation. It does not reset when a project starts or when the robot is powered off.

([Rotation 1 v] ángulos en grados)

Parámetros

Descripción

dispositivo

The Rotation Sensor to use. Choose from the Rotation Sensors configured in the Devices window.

Rotation position#

The Rotation position reporter block reports the shaft’s total rotational position.

Unlike angle, position can increase past 359.99 degrees or decrease below 0 degrees. Position tracks how far the shaft rotates forward or reverse during a project and can be reset as needed.

([Rotation 1 v] posición en [grados v] :: custom-sensing)

Parámetros

Descripción

dispositivo

The Rotation Sensor to use. Choose from the Rotation Sensors configured in the Devices window.

unidades

The position unit: degrees or turns.

Rotation velocity#

The Rotation velocity reporter block reports how fast the shaft is rotating.

([Rotation 1 v] velocidad en [rpm v] :: custom-sensing)

Parámetros

Descripción

dispositivo

The Rotation Sensor to use. Choose from the Rotation Sensors configured in the Devices window.

unidades

The velocity unit: rpm (revolutions per minute) or dps (degrees per second).