Transmisión#
Introduction#
The VEX IQ (1st gen) Drivetrain uses an external Gyro Sensor to support precise forward, reverse, and turning movements. These blocks allow the robot to move continuously or for set distances, rotate by degrees or to a heading, and respond to changes in its rotational orientation.
The Drivetrain category also includes configuration blocks that let you set drive and turn speeds, define stopping behavior, apply timeouts to avoid execution stalls, and manually update the robot’s heading or rotation values. These features provide flexibility when designing autonomous behaviors or real-time adjustments.
Below is a list of all blocks:
Actions — Drive or turn the robot for a set distance, angle, or continuously.
drive — Drives the robot continuously.
drive for — Drives the robot for a set distance.
turn — Turns the robot continuously.
turn for — Turns the robot a specific number of degrees.
turn to heading — Turns the robot to face a specific absolute heading.
turn to rotation — Turns the robot to reach a specific cumulative rotation.
stop driving — Stops all robot movement.
Settings — Configure drivetrain speeds, stopping, timeouts, and rotation values.
set drive velocity — Sets the speed for all drive blocks.
set turn velocity — Sets the speed for all turn blocks.
set drive stopping — Configures the stopping behavior after movement ends.
set drive timeout — Limits how long drive blocks wait to reach their goal.
set drive heading — Manually sets the robot’s gyro heading value.
set drive rotation — Manually sets the robot’s cumulative rotation value.
Values — Return drivetrain motion status, heading, rotation, velocity, and current draw.
drive is done? — Returns a Boolean indicating whether the drivetrain is no longer moving.
drive is moving? — Returns a Boolean indicating whether the drivetrain is currently moving.
drive heading — Returns the drivetrain’s heading angle.
drive rotation — Returns how much the drivetrain has turned since the project started.
drive velocity — Returns the drivetrain’s current velocity.
drive current — Returns the current drawn by the drivetrain’s motors.
Actions#
drive#
The drive block moves the drivetrain forward or in reverse using the current drive velocity. This block runs continuously until another Drivetrain block interrupts it or the project stops.
unidad [adelante v]
Parameters |
Description |
|---|---|
direction |
The direction in which the robot drives:
|
Example
cuando empezó
[Drive forward, then stop.]
unidad [adelante v]
esperar (2) segundos
deja de conducir
drive for#
The drive for block moves the drivetrain forward or in reverse for a specified distance using the current drive velocity.
unidad [adelante v] para (200) [mm v] ▶
Parameters |
Description |
|---|---|
direction |
The direction in which the robot drives:
|
distance |
The distance the robot drives as an integer or decimal. |
unit |
The unit of measurement representing the distance:
|
expanding arrow |
By default, this is a waiting block, so the drivetrain will finish moving before running the next block. To make the drivetrain start moving and immediately run the next block right away, expand the block to say and don’t wait. |
Example
cuando empezó
[Drive backward 500 mm.]
unidad [atrás v] para (500) [mm v] ▶
turn#
The turn block turns the drivetrain continuously left or right using the current turn velocity. The drivetrain will keep turning until another drivetrain block runs or the project stops.
turno [derecha v]
Parameters |
Description |
|---|---|
direction |
The direction in which the robot turns:
|
Example
cuando empezó
[Turn right, then stop.]
turno [derecha v]
esperar (2) segundos
deja de conducir
turn for#
The turn for block turns the drivetrain left or right for a specific number of degrees using the current turn velocity.
girar [derecha v] por (90) grado ▶
Parameters |
Description |
|---|---|
direction |
The direction in which the robot turns:
|
angle |
The number of degrees the robot turns as an integer or decimal. |
expanding arrow |
By default, this is a waiting block, so the drivetrain will finish turning before running the next block. To make the drivetrain start turning and immediately run the next block right away, expand the block to say and don’t wait. |
Example
cuando empezó
[Turn left, then turn around to the right.]
girar [izquierda v] por (90) grado ▶
girar [derecha v] por (180) grado ▶
turn to heading#
The turn to heading block turns the drivetrain to face a specific heading using the current turn velocity.
girar hacia el rumbo (90) grados ▶
Parameters |
Description |
|---|---|
heading |
The absolute heading the drivetrain will turn to from -360 to 360 degrees. |
expanding arrow |
By default, this is a waiting block, so the drivetrain will finish turning before running the next block. To make the drivetrain start turning and immediately run the next block right away, expand the block to say and don’t wait. |
Example
cuando empezó
[Turn to face the cardinal directions.]
girar hacia el rumbo (90) grados ▶
esperar (2) segundos
girar hacia el rumbo (180) grados ▶
esperar (2) segundos
girar hacia el rumbo (270) grados ▶
esperar (2) segundos
girar hacia el rumbo (0) grados ▶
esperar (2) segundos
turn to rotation#
The turn to rotation block turns the drivetrain to face a specific rotational value using the current turn velocity.
girar a rotación (90) grados ▶
Parameters |
Description |
|---|---|
rotation |
The cumulative rotation value the robot will turn to as an integer or decimal. |
expanding arrow |
By default, this is a waiting block, so the drivetrain will finish turning before running the next block. To make the drivetrain start turning and immediately run the next block right away, expand the block to say and don’t wait. |
Example
cuando empezó
[Turn left, then spin in a circle clockwise and face right.]
girar a rotación (-90) grados ▶
esperar (2) segundos
girar a rotación (450) grados ▶
stop driving#
The stop driving block immediately stops all movement of the drivetrain.
deja de conducir
Parameters |
Description |
|---|---|
This block has no parameters. |
Example
cuando empezó
[Drive forward, then stop.]
unidad [adelante v]
esperar [4] segundos
deja de conducir
Settings#
set drive velocity#
The set drive velocity block sets the default movement speed as a percentage for all subsequent movement blocks in the project.
establecer la velocidad de accionamiento al (50)%
Parameters |
Description |
|---|---|
velocity |
Sets the default movement velocity from 0% to 100%. |
Example
cuando empezó
[Drive forward at the default velocity.]
unidad [adelante v] para (100) [mm v] ▶
esperar (1) segundos
[Move slower.]
establecer la velocidad de accionamiento al (20)%
unidad [adelante v] para (100) [mm v] ▶
esperar (1) segundos
[Move faster.]
establecer la velocidad de accionamiento al (100)%
unidad [adelante v] para (100) [mm v] ▶
esperar (1) segundos
set turn velocity#
The set turn velocity block sets the default velocity as a percentage for all subsequent turn blocks in the project.
establecer la velocidad de giro al (50)%
Parameters |
Description |
|---|---|
velocity |
Sets the default turn velocity from 0% to 100%. |
Example
cuando empezó
[Turn at default velocity.]
girar [derecha v] por (100) grado ▶
esperar (1) segundos
[Turn slower.]
establecer la velocidad de giro al (20)%
girar [derecha v] por (100) grado ▶
esperar (1) segundos
[Turn faster.]
establecer la velocidad de giro al (100)%
girar [derecha v] por (100) grado ▶
esperar (1) segundos
set drive stopping#
The set drive stopping block sets how the drivetrain behaves when drivetrain movement ends.
Establecer la detención de la unidad en [freno v]
Parameters |
Description |
|---|---|
stopping behavior |
Sets how the drivetrain stops:
|
Example
cuando empezó
[Drive forward and coast to a stop.]
establecer la velocidad de accionamiento al (100)%
Establecer la detención de la unidad en [libre v]
unidad [adelante v]
esperar (2) segundos
deja de conducir
set drive timeout#
The set drive timeout block sets a time limit for how long a Drivetrain block will wait to reach its target. If the robot cannot complete the movement within the set time, it will stop automatically and continue with the next block.
Note: The drivetrain’s time limit is used to prevent Drivetrain blocks that do not reach their target position from stopping the execution of other blocks in the stack.
Establezca el tiempo de espera de la unidad en (1) segundos
Parameters |
Description |
|---|---|
time |
The maximum number of seconds a Drivetrain block will run before stopping and moving to the next block. |
Example
cuando empezó
[Drive forward for 1 second, then turn.]
Establezca el tiempo de espera de la unidad en (1) segundos
unidad [adelante v] para (25) [pulgadas v] ▶
girar [derecha v] por (90) grado ▶
set drive heading#
The set drive heading block sets the Gyro Sensor’s current heading to a specified value.
establecer el rumbo de la unidad a (0) grados
Parameters |
Description |
|---|---|
heading |
The heading value to assign, in degrees. |
Example
cuando empezó
[Turn to the left.]
establecer el rumbo de la unidad a (90) grados
girar hacia el rumbo (0) grados ▶
set drive rotation#
The set drive rotation block sets the Gyro Sensor’s current cumulative rotation value.
establecer la rotación de la unidad a (0) grados
Parameters |
Description |
|---|---|
rotation |
The cumulative rotation value to assign, in degrees. |
Example
cuando empezó
[Spin counterclockwise two times.]
establecer la rotación de la unidad a (720) grados
girar a rotación (0) grados ▶
Values#
drive is done?#
The drive is done? block returns a Boolean indicating whether the drivetrain is not moving.
True — The drivetrain is not moving.
False — The drivetrain is moving.
Note: This block only detects movement from blocks that can expand to show the and don’t wait option.
<¿La unidad está lista?>
Parameters |
Description |
|---|---|
This block has no parameters. |
Example
cuando empezó
[Start spinning when the drive is complete.]
unidad [adelante v] para (200) [mm v] ◀ y no esperes
para siempre
si <¿La unidad está lista?> entonces
girar [derecha v] por (360) grado ▶
romper
demás
Coloque el cursor en la fila (1) columna (1) en la pantalla
imprimir [Still Moving...] en la pantalla ▶
esperar (0.1) segundos
pantalla clara
drive is moving?#
The drive is moving? block returns a Boolean indicating whether the drivetrain is moving.
True — The drivetrain is moving.
False — The drivetrain is not moving.
Note: This block only detects movement from blocks that can expand to show the and don’t wait option.
<¿La unidad se está moviendo?>
Parameters |
Description |
|---|---|
This block has no parameters. |
Example
cuando empezó
[Print that the robot is moving while it is still driving.]
unidad [adelante v] para (200) [mm v] ◀ y no esperes
mientras <¿La unidad se está moviendo?>
Coloque el cursor en la fila (1) columna (1) en la pantalla
imprimir [Still Moving...] en la pantalla ▶
esperar (0.1) segundos
pantalla clara
fin
Coloque el cursor en la fila (1) columna (1) en la pantalla
imprimir [Done!] en la pantalla ▶
drive heading#
The drive heading block returns the drivetrain’s heading angle as a decimal number, in the range 0 to 359.99 degrees.
(rumbo de la unidad en grados)
Parameters |
Description |
|---|---|
This block has no parameters. |
Example
cuando empezó
[Display the heading after turning.]
girar [derecha v] por (450) grado ▶
imprimir (rumbo de la unidad en grados) en la pantalla ◀ y coloque el cursor en la siguiente fila
drive rotation#
The drive rotation block returns how much the drivetrain has turned since the project started, in degrees as a decimal number: positive for clockwise, negative for counterclockwise.
(rotación de la unidad en grados)
Parameters |
Description |
|---|---|
This block has no parameters. |
Example
cuando empezó
[Display the rotation after turning.]
girar [derecha v] por (450) grado ▶
imprimir (rotación de la unidad en grados) en la pantalla ◀ y coloque el cursor en la siguiente fila
drive velocity#
The drive velocity block returns the current speed of the drivetrain in a range from -100% to 100% or -127 rpm to 127 rpm.
(velocidad de accionamiento en [% v])
Parameters |
Description |
|---|---|
unit |
The unit of measurement:
|
Example
cuando empezó
[Display the velocity as the robot is moving.]
unidad [adelante v]
esperar (1) segundos
imprimir (velocidad de accionamiento en [% v]) en la pantalla ◀ y coloque el cursor en la siguiente fila
deja de conducir
drive current#
The drive current block returns the amount of electrical current the drivetrain’s motors are drawing in a range from 0.0 to 1.2 amps (amperes).
(corriente de accionamiento en [amps v])
Parameters |
Description |
|---|---|
This block has no parameters. |
Example
cuando empezó
[Display the current as the robot is moving.]
Establezca la precisión de impresión en [0.01 v] en la pantalla
unidad [adelante v]
esperar (1) segundos
imprimir (corriente de accionamiento en [amps v]) en la pantalla ◀ y coloque el cursor en la siguiente fila
deja de conducir