Tank Drive


Tank Drive is a very easy to program operator control drive control scheme. The idea behind it is that the controller's left joystick controls the left side of the chassis, while the right joystick controls the right side of the chassis.

This drive control scheme is extremely easy to program, but may be unintuitive to newer drivers who may have prior experience with video game controllers. However, some higher skilled drivers may prefer tank drive as it provides direct control to each side of the chassis and may provide more maneuverability.

Example Code

#include "main.h"

// Motor Group Declarations for Left and Right
pros::Motor_Group motors_left(1);
pros::Motor_Group motors_right(2, true); // Be sure to reverse this!

void opcontrol() {
    while(1) {
        // Drive the left side of the robot forward at joystick left Y speed
        // Drive the right side of the robot forward at joystick right Y speed



Easy to Program

Always requires 2 joysticks

Direct control to motors allows a skilled driver to be more maneuverable with the robot

Imprecise Linear Forwards and Backwards Movement, as well as In-Place Turning

Easy to Debug

May be less intuitive for less experienced drivers.

Contributing Teams to this Article:

  • BLRS (Purdue SIGBots)

Last updated


This work is licensed under a Attribution-ShareAlike 2.0 Generic License