Transmisión#

Introducción#

The VEX GO Drivetrain uses a built-in Inertial 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.

Below is a list of all blocks:

Acciones: Mover y girar el robot.

  • drive — Drives the robot continuously forward or in reverse.

  • drive for — Drives the robot for a set distance.

  • drive until — Drives until a specified condition.

  • turn — Turns the robot continuously left or right.

  • 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.

Ajustes: Ajuste la configuración de la transmisión.

Valores: comprobar el estado del movimiento.

  • drive is done? — Returns a Boolean indicating whether the drivetrain is no longer moving.

  • drive heading — Returns the drivetrain’s heading angle (0 to 359.99 degrees).

  • drive rotation — Returns how much the drivetrain has turned since the project started.

  • drive velocity — Returns the drivetrain’s current velocity in %.

Comportamiento#

conducir#

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]

Parámetros

Descripción

dirección

The direction in which the robot drives:

  • forward
  • reverse

Ejemplo

cuando empezó :: hat events
[Build Used: Code Base 2.0]
[Drive forward then stop.]
unidad [adelante v]
esperar (2) segundos
deja de conducir

conducir para#

The drive for block moves the drivetrain forward or in reverse for a specified distance using the current drive velocity.

unidad [adelante v] para [100] [mm v] ▶

Parámetros

Descripción

dirección

The direction in which the robot drives:

  • forward
  • reverse

distancia

The distance the robot drives, as an integer or decimal.

unidad

The unit of measurement that represents the distance:

  • mm — Millimeters
  • inches

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.

Ejemplo

cuando empezó :: hat events
[Build Used: Code Base 2.0]
[Drive back and forth.]
unidad [adelante v] para [100] [mm v] ▶
unidad [atrás v] para [4] [pulgadas v] ▶

conducir hasta#

The drive until block is used to move the drivetrain indefinitely using the current drive velocity until the Eye Sensor detects an object or the robot crashes into an object or wall.

Conducir [adelante v] al [choque v] ▶

Parámetros

Descripción

dirección

The direction in which the robot drives:

  • forward
  • reverse

condición

The condition that stops the drivetrain:

  • crash — When the robot crashes into an object.
  • object — When the Eye Sensor detects an object (Eye Sensor must be installed).

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.

Ejemplo

cuando empezó :: hat events
[Build Used: Code Base 2.0]
[Turn right after a crash.]
Conducir [adelante v] al [choque v] ▶
girar [derecha v] por (90) grado ▶

doblar#

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]

Parámetros

Descripción

dirección

The direction in which the robot turns:

  • left
  • right

Ejemplo

cuando empezó :: hat events
[Build Used: Code Base 2.0]
[Turn right and left, then stop.]
turno [derecha v]
esperar [2] segundos
turno [izquierda v]
esperar [2] segundos
deja de conducir

girar para#

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 ▶

Parámetros

Descripción

dirección

The direction in which the robot turns:

  • left
  • right

ángulo

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.

Ejemplo

cuando empezó :: hat events
[Build Used: Code Base 2.0]
[Turn right then left.]
girar [derecha v] por (90) grado ▶
girar [izquierda v] por (90) grado ▶

girar al rumbo#

The turn to heading block turns the drivetrain to face a specific heading using the current turn velocity.

girar hacia el rumbo [90] grados ▶

Parámetros

Descripción

título

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.

Ejemplo

cuando empezó :: hat events
[Build Used: Code Base 2.0]
[Turn to face the cardinal directions.]
girar hacia el rumbo [90] grados ▶
esperar [1] segundos
girar hacia el rumbo [180] grados ▶
esperar [1] segundos
girar hacia el rumbo [270] grados ▶
esperar [1] segundos
girar hacia el rumbo [0] grados ▶

pasar a rotación#

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 ▶

Parámetros

Descripción

rotación

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.

Ejemplo

cuando empezó :: hat events
[Build Used: Code Base 2.0]
[Spin around twice.]
girar a rotación (720) grados ▶

deja de conducir#

The stop driving block immediately stops all movement of the drivetrain.

deja de conducir

Parámetros

Descripción

Este bloque no tiene parámetros.

Ejemplo

cuando empezó :: hat events
[Build Used: Code Base 2.0]
[Drive forward then stop.]
unidad [adelante v]
esperar (2) segundos
deja de conducir

establecer la velocidad de conducción#

The set drive velocity block sets the default movement speed as a percentage for all subsequent movement blocks in the project.

set drive velocity to [50] %

Parámetros

Descripción

velocidad

Sets the default movement velocity from 0% to 100%.

Ejemplo

cuando empezó :: hat events
[Build Used: Code Base 2.0]
[Drive at different velocities.]
unidad [adelante v] para [100] [mm v] ▶
esperar [1] segundos
[Drive slow.]
set drive velocity to [20] %
unidad [adelante v] para [100] [mm v] ▶
esperar [1] segundos
[Drive fast.]
set drive velocity to [100] %
unidad [adelante v] para [100] [mm v] ▶

establecer la velocidad de giro#

The set turn velocity block sets the default velocity as a percentage for all subsequent turn blocks in the project.

set turn velocity to [50] %

Parámetros

Descripción

velocidad

Sets the default turn velocity from 0% to 100%.

Ejemplo

cuando empezó :: hat events
[Build Used: Code Base 2.0]
[Turn at different velocities.]
girar [derecha v] por [180] grado ▶
esperar [1] segundos
[Turn fast.]
set turn velocity to [100] %
girar [derecha v] por [180] grado ▶

Establecer la parada de la unidad#

The set drive stopping block sets how the drivetrain behaves when drivetrain movement ends.

Establecer la detención de la unidad en [freno v]

Parámetros

Descripción

comportamiento de detención

Sets how the drivetrain stops:

  • brake — Stops immediately.
  • coast — Slows gradually to a stop.
  • hold — Stops and resists movement using motor feedback.

Ejemplo

cuando empezó :: hat events
[Build Used: Code Base 2.0]
[Drive, then coast to a stop.]
set drive velocity to [100] %
Establecer la detención de la unidad en [libre v]
unidad [adelante v]
esperar [2] segundos
deja de conducir

establecer el tiempo de espera de la unidad#

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

Parámetros

Descripción

tiempo

The maximum number of seconds a Drivetrain block will run before stopping and moving to the next block.

Ejemplo

cuando empezó :: hat events
[Build Used: Code Base 2.0]
[Drive as far as possible for 1 second before turning right.]
Establezca el tiempo de espera de la unidad en [1] segundos
unidad [adelante v] para [25] [pulgadas v] ▶
girar [derecha v] por [90] grado ▶

establecer el rumbo de la unidad#

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

establecer el rumbo de la unidad a [0] grados

Parámetros

Descripción

título

The heading value to assign, in degrees.

Ejemplo

cuando empezó :: hat events
[Build Used: Code Base 2.0]
[Face the new 0 degree heading.]
establecer el rumbo de la unidad a [90] grados
girar hacia el rumbo [0] grados ▶

establecer la rotación de la unidad#

The set drive rotation block sets the Inertial Sensor’s current cumulative rotation value.

establecer la rotación de la unidad a (0) grados

Parámetros

Descripción

rotación

The cumulative rotation value to assign, in degrees.

Ejemplo

cuando empezó :: hat events
[Build Used: Code Base 2.0]
[Spin counterclockwise two times.]
establecer la rotación de la unidad a [720] grados
girar a rotación [0] grados ▶

Valores#

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?>

Parámetros

Descripción

Este bloque no tiene parámetros.

Ejemplo

cuando empezó :: hat events
[Build Used: Code Base 2.0]
[Turn when the drivetrain is done moving forward.]
unidad [adelante v] para [100] [mm v] ◀ y no esperes
esperar [0.25] segundos
para siempre
si <¿La unidad está lista?> entonces
girar [derecha v] por [180] grado ▶
romper
demás
imprimir [Still moving...] ▶
esperar [0.1] segundos
borrar todas las filas

rumbo de la unidad#

The drive heading block returns the drivetrain’s heading angle in a range from 0 to 359.99 degrees.

(rumbo de la unidad en grados)

Parámetros

Descripción

Este bloque no tiene parámetros.

Ejemplo

cuando empezó :: hat events
[Build Used: Code Base 2.0]
[Display the heading while turning.]
girar [derecha v] por [450] grado ◀ y no esperes
para siempre
borrar todas las filas
imprimir (rumbo de la unidad en grados) ▶
esperar [0.1] segundos

rotación de la unidad#

The drive rotation block returns how much the drivetrain has turned since the project started, in degrees: positive for clockwise, negative for counterclockwise.

(rotación de la unidad en grados)

Parámetros

Descripción

Este bloque no tiene parámetros.

Ejemplo

cuando empezó :: hat events
[Build Used: Code Base 2.0]
[Display the rotation while turning.]
girar [derecha v] por [450] grado ◀ y no esperes
para siempre
borrar todas las filas
imprimir (rotación de la unidad en grados) ▶
esperar [0.1] segundos

velocidad de accionamiento#

The drive velocity block returns the current speed of the drivetrain in a range from -100% to 100%.

(velocidad de accionamiento en %)

Parámetros

Descripción

Este bloque no tiene parámetros.

Ejemplo

cuando empezó :: hat events
[Build Used: Code Base 2.0]
[Display the velocity of the robot before and while moving.]
imprimir [Start: ] ▶
imprimir (velocidad de accionamiento en %) ▶
colocar el cursor en la siguiente fila
unidad [adelante v]
esperar [0.5] segundos
imprimir [Moving: ] ▶
imprimir (velocidad de accionamiento en %) ▶
deja de conducir