How would we program in a Logitech gamepad controller into LabVIEW?

We want to be able to use the Logitech F310 controller to drive our robot with tank drive (using the Y axis of each joystick on the controller to run their respective drive motors on each side of the robot), and we can’t figure out how. All of the things we’ve found online are for the Attack controllers, and use two USB ports rather than 1. Any help would be much appreciated.

In Labview, the programmers should use Unbundle By Name for the axes wire of the Get Joystick vi, or use the Get Axis vi and use axis 2 and axis 4, these are the Y axis of the two main joysticks.

The Logitech F310 has the following axis mapping on a single USB port: (this is exactly the same as the Xbox 360 gamepad, for reference)

Axis 1 - Left X
Axis 2 - Left Y
Axis 3 - Sum of L2 and R2 triggers - One is positive, the other is negative, both or none is 0
Axis 4 - Right X
Axis 5 - Right Y
Axis 6 - D-Pad Horizontal - One direction is +1, the other -1. You can’t read the vertical axis

Please note that mgurgol is not correct entirely, axis 4 is NOT right Y on the F310 (it is on the DualAction).

Our team used this last year during two events without any issues:

Major thanks to Alexander Meyer on team 2358.

My apologies, I was thinking of the Dual Action.

In LabVIEW, it’s very easy to see which controls on the gamepad are associated with the various buttons and axes. Just attach indicators to the existing Joystick Get in Teleop. Run the Robot Main vi and look at the Teleop front panel as you play with the joystick.



I still dont understand how to use the two mini-joysticks on the F310 gamepad as a tank drive.

Axis 2 is the left Y axis. Axis 5 is the right Y axis. Use those as the inputs to a standard tank drive function.

Ohh Thanks, but what was the other post u posted Jw:cool: