wiki:ControlSystems/GameControllers/LogitechF310

Version 3 (modified by David Albert, 6 years ago) (diff)

--

The Logitech F310 game controller is an inexpensive alternative to the standard Xbox controller that can be purchased for $20 delivered. The F310 has two analog joysticks and two analog triggers but uses different constants than those defined in GenericHID.Hand to access them.

You can access the F310 joystick axes using the method xbox.getRawAxis(n) where n is the axis number:

   XboxController xbox = new XboxController(0);
   double left_X        = xbox.getRawAxis(0);
   double left_Y        = xbox.getRawAxis(1);
   double left_trigger  = xbox.getRawAxis(2);
   double right_trigger = xbox.getRawAxis(3);
   double right_X       = xbox.getRawAxis(4);
   double right_Y       = xbox.getRawAxis(5);

Attachments (1)

Download all attachments as: .zip