Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 51 - RoboGenius Pro C7
P. 51

    DRIVETRAIN BLOCKS

                     Drivetrain blocks in VEXcode VR control the movement of a robot. They allow you to set the
                     speed and direction of the robot's motors, enabling it to drive forward, backward or turn. You can
                     customise the drivetrain using different configurations for motor ports, speed and turn radius for
                     more precise control.
                     The drivetrain blocks are given below:

                                     Blocks                                          Description

                                                  Drivetrain - Actions

                                                             Moves the drivetrain continuously in the selected direction
                       drive  forward
                                                             (either forward or reverse).

                                                             Moves the drivetrain a designated distance in the chosen
                        drive  forward  for  200  mm
                                                             direction.

                                                             Rotates the drivetrain continuously to the left or right in
                       turn  right
                                                             place.

                                                             Rotates the drivetrain a specified number of degrees to
                       turn  right  for  90  degrees
                                                             the left or right in place.

                                                             Rotates the robot to a specified absolute heading using
                       turn to heading  90  degrees
                                                             the onboard gyro sensor.

                                                             Rotates  the  robot  to  a  particular  rotation  value  using
                       turn to rotation  90  degrees
                                                             internal tracking.

                       stop driving                          Instantly halts all drivetrain movement.

                                                  Drivetrain - Settings

                                                             Adjusts  the  speed  (percentage)  for both  forward and
                       set drive velocity to 50  %
                                                             reverse driving.

                                                             Adjusts  the  rotational  speed  (percentage)  for turning
                       set turn velocity to  50  %
                                                             actions.

                                                             Manually  adjusts  the  robot's  directional  orientation  in
                       set drive heading to  0  degrees
                                                             degrees.

                                                             Manually adjusts  the robot's  rotational  position  in
                       set drive rotation to  0  degrees
                                                             degrees.
                                                             Sets a time limit for drive/turn commands (e.g., drive_
                       set drive timeout to  1  seconds      for,  turn_for) to  prevent  the  robot  from getting stuck
                                                             indefinitely.

                                                                               Getting Started with VEXcode VR
                                                                                                                        49

| 46 47 48 49 50 51 52 53 54 55 56 |