Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to use the Logitech F710 gamepad as an input device to a python program. I am using Ubuntu. I do not really know where to start, so here are a few questions:

  1. How does Ubuntu detect the gamepad?
  2. If the gamepad is recognized within Ubuntu, how would I interact with this device via a python script?
  3. If this is not easy to do in Ubuntu, how would I interact with the gamepad via a python script in Windows?
share|improve this question
add comment

2 Answers

up vote 0 down vote accepted
  1. As a USB HID device.

  2. Via the event subsystem.

  3. Uh...

share|improve this answer
    
Thank you. With regards to recognizing a USB HID device, do I need to install drivers for the gamepad? –  wherestheforce Jul 4 '12 at 15:45
    
No. All modern Linuxes have the USB HID driver already available, either built-in or as a module. –  Ignacio Vazquez-Abrams Jul 4 '12 at 15:47
add comment

Input devices register as /dev/input/eventX in Linux, to interact with them you have to open that pseudo file and read from it.

Example source code to do in from C can be downloaded via:

apt-get source evtest

Python Code can be found at:

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.