VCS Example Program with Controller - Modkit - Tank Control

This example program shows how to use remote control values to move the robot.

TankControl.vex

Configuration

  • A V5 Smart Motor, on Port 1, named leftMotor
  • A V5 Smart Motor, on Port 10, named rightMotor
Program

How it works

First, the when (STARTED) block tells the robot to run this code when the program starts.

Next, the program will enter a while loop, aligning motor velocity to the percentage values retrieved from the positioning of the joysticks (-100 to +100).

Then the .spin commands the motors to move along with the velocity specified in the previous commands.

NOTE: The joysticks work in unison to move the robot in tank mode. 

Still need help? Contact Us Contact Us