FIRST Robotics Competition Blog

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Tank Control of Motors Snippet

I.B.Hating
NI Employee (retired)

This snippet shows how to modify the FRC roboRIO Project built with the Arcade driving configuration to the Tank driving configuration. The only modifications necessary are to the Teleop VI to make this change. The existing Arcade Drive VI can be directly replaced with the Tank Drive VI found in the same pallet location. Then, the joystick must be configured to control each wheel individually. In the case of the below snippet, a joystick with two thumb-sticks was used where the first thumb-stick maps to row 0 of Joystick 0 and the second thumb-stick maps to row 5 of Joystick 0. Below, the array is indexed by row to get individual data per thumb-stick which is passed into each motor input on the Tank Drive VI.

Teleop VI

Arcade to Tank Drive.png

Brian H. -- Electronics & Measurements Product Marketing Manager