View Single Post
  #4   Spotlight this post!  
Unread 08-02-2016, 08:43
MaraiGG MaraiGG is offline
Registered User
FRC #5180
 
Join Date: Mar 2015
Location: South Carolina, United States
Posts: 2
MaraiGG is an unknown quantity at this point
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.
Reply With Quote