Drivetrain#

Drive#

The Drive block is used to move the Drivetrain 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.

Diagram illustrating the Drive block for controlling a robot's Drivetrain direction and movement in programming.

Select which direction for the drivetrain to move in.

Diagram illustrating drivetrain movement commands: drive, turn, stop, and set velocity in robotics programming.

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

Image showing various Drivetrain blocks for controlling robot movement, including drive, turn, and velocity settings.

Drive for#

The Drive for block is used to move the Drivetrain for a given distance.

This is can be a non-waiting or waiting block depending on if the and don’t wait option is used.

Diagram illustrating the Drive for block used to move the Drivetrain a specified distance in a chosen direction.

Select which direction for the drivetrain to move in.

Diagram illustrating the Drivetrain commands for driving and turning robot movements in programming.

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

The Drive for block can accept decimals, integers, or numeric blocks.

Diagram illustrating the Drive for block used to move the Drivetrain a specified distance in robotics programming.

By default, the Drive for block will block any subsequent blocks from executing until it’s finished. By expanding the Drive for block to show and don’t wait, blocks will continue to execute while the Drivetrain is moving.

Diagram illustrating the Drive for block used to control a Drivetrain's movement for a specified distance.

In this example, the robot will drive in reverse for 500 mm.

Diagram illustrating various Drivetrain commands: Drive, Turn, Stop, Set velocities, and headings for robot movement.

Turn#

The Turn block is used to rotate the Drivetrain 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.

Image of a Turn block used in robotics to control drivetrain rotation direction and angle in programming.

Select which direction the Drivetrain will turn.

Diagram illustrating drivetrain turn direction commands for robotic movement and control.

In this example, the robot will turn towards the left for 2 seconds, then stop.

Diagram illustrating Drivetrain commands: Drive, Turn, Set velocities, and Stop driving for robot navigation.

Turn for#

The Turn for block is used to rotate the Drivetrain for a given number of degrees.

This is can be a non-waiting or waiting block depending on if the and don’t wait option is used.

Diagram illustrating the Turn for block used to rotate a Drivetrain for a specified number of degrees.

Select which direction the Drivetrain will turn.

Diagram illustrating drivetrain commands for driving and turning directions in robotics programming.

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

The Drive for block can accept decimals, integers, or numeric blocks.

By default, the Turn for block will block any subsequent blocks from executing until it’s finished. By expanding the Turn for block to show and don’t wait, blocks will continue to execute while the Drivetrain is moving.

Image illustrating the Turn for Wait" block in a robot programming context for Drivetrain commands.

In this example, the robot turn left for 45 degrees.

Diagram illustrating various drivetrain commands for robot movement, including drive, turn, and velocity settings.

Turn to heading#

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

This is can be a non-waiting or waiting block depending on if the and don’t wait option is used.

Image illustrating the Turn to heading" block for controlling a robot's direction using a Gyro sensor.

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

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

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

Image of a compass indicating direction for the Drivetrain's turn to heading block in robotics programming.

The Turn to heading block can accept decimals, integers, or numeric blocks.

By default, the Turn to heading block will block any subsequent blocks from executing until it’s finished. By expanding the Turn to heading block to show and don’t wait, blocks will continue to execute while the Drivetrain is moving.

Image showing a robot's drivetrain commands for turning to a specific heading using a gyro sensor.

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

Flowchart illustrating the Drivetrain commands: Drive, Turn, Set velocities, and Stop driving for robot control.

Turn to rotation#

The Turn to rotation block is used to turn a Drivetrain to a specific angle of rotation using the built-in Gyro sensor.

This is can be a non-waiting or waiting block depending on if the and don’t wait option is used.

Diagram of the Turn to Rotation block for controlling Drivetrain rotation using a Gyro sensor in robotics programming.

The Turn to rotation block turns a cumulative degree measure. This means:

  • When the robot turns clockwise past the 360 degrees, the degree measure continues to increase.

  • When the robot turns counterclockwise past 0 degrees, the degree measure continues to decrease.

Image of a compass illustrating the concept of turning to a specific rotation for a robot's drivetrain.

The Turn to rotation block can accept decimals, integers, or numeric blocks.

By default, the Turn to rotation block will block any subsequent blocks from executing until it’s finished. By expanding the Turn to rotation block to show and don’t wait, blocks will continue to execute while the Drivetrain is moving.

Image depicting the Turn to rotation block for controlling Drivetrain rotation using a Gyro sensor in robotics.

In this example, the robot will turn to 480 degrees.

Diagram illustrating the use of the Turn to Rotation block in a robot's drivetrain programming.

Stop driving#

The Stop driving block is used to stop the drivetrain.

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

Stop driving block in robotics programming, used to halt the drivetrain's movement without waiting subsequent commands.

In this example, the robot will stop driving after 4 seconds.

Robot driving forward for 2 seconds, demonstrating the Drive block in a programming environment.

Set drive velocity#

The Set drive velocity block is used to set the speed of the Drivetrain.

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

Set drive velocity block for adjusting the speed of the Drivetrain, allowing non-waiting execution of subsequent commands.

The Set drive velocity block accepts a range from 1% to 100%. The default drive velocity is 50%.

In this example, the drive velocity is set to 100% before the robot drives forward for 600 MM.

Diagram showing Drivetrain blocks for setting drive velocity, turn velocity, heading, and rotation in a robotics program.

Set turn velocity#

The Set turn velocity block is used to set the speed of the Drivetrain’s turns.

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

Set turn velocity block for Drivetrain, allowing adjustment of turn speed from 1% to 100% for robot movements.

The Set turn velocity block accepts a range from 1% to 100%. The default turn velocity is 50%.

In this example, the turn velocity is set to 100% before the robot turns to the left for 180 degrees.

Example of setting turn velocity for a robot, showing 100% turn speed and a left turn of 180 degrees.

Set drive heading#

The Set drive heading block is used to set the Drivetrain’s Gyro heading value.

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

Image showing the Set Drive Heading block used to set the Drivetrain's Gyro heading value to a specific degree.

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.

The Set drive heading block can accept integers or numeric blocks.

In this example, the Drivetrain’s Gyro heading will be set to 90 degrees.

Diagram showing the Set Drive Heading block for adjusting the Drivetrain's Gyro heading to a specific degree.

Set drive rotation#

The Set drive rotation block is used to set the Drivetrain’s angle of rotation.

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

Diagram illustrating the Set Drive Rotation block for controlling the Drivetrain's angle of rotation in robotics programming.

The Set drive rotation block can be used to set the Drivetrain’s angle of rotation to any given positive or negative value.

The Set drive rotation block can accept integers or numeric blocks.

Diagram illustrating Drivetrain commands for driving, turning, and setting velocities in a robotics programming context.