How to Drive Forward and Backward - V5 Clawbot - VEXcode V5 Text

This program shows how to program the V5 Clawbot to move forward and backward using VEXcode V5 Text.

main.cpp

How it Works

This program uses the driveFor(distance, units) command to drive for a specified distance.

You can specify the units of distance by using a numeric value. You can specify units by using inches or mm (millimeters).

You can use a positive numeric value to move your robot forward and a negative numeric value to move the robot backward.

Steps executed in the program:

  1. The drivetrain will drive six inches forward. 
  2. The program will wait one second before executing the next line of code.
  3. The drivetrain will drive six inches in reverse.