wiki:ControlSystems/GameControllers/LogitechF310

Version 1 (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 form $15 to $20 delivered. The F310 uses different constants for accessing the joysticks so you can't rely on the constants defined in GenericHID.Hand.

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

  • 0=left X axis
  • 1=left Y axis
  • 2=left analog trigger
  • 3=right analog trigger
  • 4=right X axis
  • 5=right Y axis

So, for example, to read the right joystick position:

   XboxController xbox = new XboxController(0);
   double right_X = xbox.getRawAxis(4);
   double right_Y = xbox.getRawAxis(5);

Attachments (1)

Download all attachments as: .zip