Transmisión#

Drive#

The Drive block is used to move the 123 Robot in the specified direction forever, until a new Drivetrain command is used, or the project is stopped.

This is a non-waiting block and allows any subsequent blocks to execute without delay.

unidad [adelante v]

Select which direction for the 123 Robot to move in.

Diagram illustrating the Drivetrain commands for controlling the 123 Robot's movement and turning directions.

In this example, the 123 Robot will drive forward for 2 seconds, then stop.

cuando empezó
unidad [adelante v]
esperar (2) segundos
deja de conducir

Drive For#

The Drive For block is used to move the 123 Robot for a given distance.

This is a waiting block and does not allow subsequent blocks to trigger until it is done.

conducir [adelante v] por (1) [pasos v]

Select which direction for the 123 Robot to move in.

Diagram illustrating the Drivetrain blocks for controlling the 123 Robot's movement and turning actions.

Set how far the 123 Robot will move by entering a value, and choosing the unit of measurement (steps or millimeters).

Illustration of the 123 Robot's drivetrain blocks for driving and turning commands in programming.

In this example, the robot will drive forward for 2 steps.

cuando empezó
conducir [adelante v] por (3) [pasos v]

Drive Until#

The Drive Until block is used to move the 123 Robot indefinitely until a specified condition is met.

This is a waiting block and does not allow subsequent blocks to trigger until it is done.

Conducir [adelante v] al [objeto v]

Select which direction for the 123 Robot to move in.

Diagram illustrating the Drivetrain commands for the 123 Robot, including Drive Until, Turn, and Set Drive Heading blocks.

Select which behavior to use:

  • object - An object is detected by the Eye Sensor on the front of the 123 Robot.

  • crash - The 123 Robot crashes into an object or wall.

  • line - The Line Detector Sensor detects a line underneath the 123 Robot.

Diagram illustrating the Drive Until block for the 123 Robot, showing movement until a specified condition is met.

In this example, the 123 Robot will drive until it crashes into a wall, then it will stop driving.

cuando empezó
Conducir [adelante v] al [choque v]
deja de conducir

Turn#

The Turn block is used to rotate the 123 Robot forever, until a new Drivetrain block is used, or the program is stopped.

This is a non-waiting block and allows any subsequent blocks to execute without delay.

turno [derecha v]

Select which direction the 123 Robot will turn.

Diagram illustrating the turn direction options for the 123 Robot in a Drivetrain programming context.

In this example, the 123 Robot will turn towards the right for 2 seconds, then stop.

cuando empezó
unidad [derecha v]
esperar (2) segundos
deja de conducir

Turn For#

The Turn For block is used to rotate the 123 Robot for a given number of degrees.

This is a waiting block and does not allow subsequent blocks to trigger until it is done.

girar [derecha v] por (90) grado

Select which direction the 123 Robot will turn.

Diagram illustrating the Turn to Heading" block for controlling the 123 Robot's direction using the Gyro sensor.

Set how far the 123 Robot will turn by entering the number of degrees.

In this example, the 123 Robot will turn left for 45 degrees.

cuando empezó
girar [izquierda v] por (45) grado

Turn to Heading#

The Turn to Heading block is used to turn a 123 Robot to a specific heading using the built-in Gyro sensor.

This is a waiting block and does not allow subsequent blocks to trigger until it is done.

girar hacia el rumbo (90) grados

The Turn to Heading block turns to an absolute degree measure. This means:

  • When the 123 Robot turns clockwise past 360 degrees, the degree measure will start increasing again from 0 degrees.

  • When the 123 Robot turns counterclockwise past 0 degrees, the degree measure start decreasing again from 360 degrees.

Compass icon illustrating the Turn to Heading block for the 123 Robot's Gyro sensor navigation.

In this example, the 123 Robot will turn to face 270 degrees.

cuando empezó
girar hacia el rumbo (270) grados

Stop Driving#

The Stop Driving block is used to stop the 123 Robot from moving.

This is a non-waiting block and allows any subsequent blocks to execute without delay.

deja de conducir

In this example, the 123 Robot will drive forward for 2 seconds, then stop.

cuando empezó
unidad [adelante v]
esperar (2) segundos
deja de conducir

Set Drive Timeout#

The Set Drive Timeout block is used to set a time limit for Drivetrain movement commands.

This is a non-waiting block and allows any subsequent blocks to execute without delay.

Establezca el tiempo de espera de la unidad en (1) segundos

The Drivetrain’s time limit is used to prevent Drivetrain blocks that do not reach their target position from waiting the execution of other blocks in the stack.

For instance, if a 123 Robot is unable to reach its target position because it encounters an obstacle like a wall, the Drivetrain block will continue running indefinitely. This would prevent any subsequent blocks in the stack from executing. By setting a time limit, the Drivetrain block will automatically stop after the specified duration, allowing the code to proceed to the next block even if the target position is not reached.

In this example, the Drivetrain is set to move forward for 15 steps with a timeout of 2 seconds. The 123 Robot won’t be able to reach the target position within 2 seconds, so the Drive block will automatically stop, and the robot will turn right by 90 degrees.

cuando empezó
Establezca el tiempo de espera de la unidad en (2) segundos
conducir [adelante v] por (15) [pasos v]
girar [derecha v] por (90) grado

Set Drive Heading#

The Set Drive Heading block is used to set the Drivetrain’s Gyro Sensor’s heading value.

This is a non-waiting block and allows any subsequent blocks to execute without delay.

establecer el rumbo de la unidad a (0) grados

The Set Drive Heading block can be used to set the Drivetrain’s position to any given heading. This block can be used to reset the orientation of the Drivetrain’s gyro when the heading is set to a value of 0.

In this example, the Drivetrain’s Gyro Sensor’s heading will be set to 90 degrees before the 123 Robot turns to a heading of 0 degrees.

cuando empezó
establecer el rumbo de la unidad a (90) grados
girar hacia el rumbo (0) grados