View Single Post
  #2   Spotlight this post!  
Unread 28-01-2012, 14:21
theprgramerdude theprgramerdude is offline
WPI Freshman
AKA: Alex
FRC #2503 (Warrior Robotics)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Brainerd, Minnesota
Posts: 347
theprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud of
Re: Logitech Controller Programming

As for the logitech controllers: Yes, there is code to separate the joysticks. However, you simply treat the whole controller as a single Joystick object.

Example:

Joystick logitechController = new Joystick(1);

//Read the y axis on the left joystick
logitechController.getRawAxis(leftYAxis); //<-- Experiment to find the exact //axis value

//Read the y axis on the right joystick
logitechController.getRawAxis(rightYAxis); // <-- find the right axis number

You'll have to experiment a bit to find the correct axis numbers to make it work properly, and possibly invert the outputs (sometimes down is positive), but each joystick is really just two independent axis' on the same "joystick" controller.
__________________
Attending: MN Duluth Regional
Reply With Quote