|
Re: RobotDrive with left joystick only? (XboxController)
I am going to assume you are using a XboxController class. If so here is the code my team used last year.
Teleop {
double rotateValue = Xbox.getLeftX();
double moveValue = Xbox.getLeftY();
mainDrive.arcadeDrive(rotateValue, moveValue);
}
Make sure if you are using a XboxController class that the axis ports are labeled starting with 0 like so.
LEFT_X_AXIS = 0,
LEFT_Y_AXIS = 1,
L_TRIGGER = 2,
R_TRIGGER = 3,
RIGHT_X_AXIS = 4,
RIGHT_Y_AXIS = 5,
DPAD_LR = 6;
I hope this helped.
|