USB HID documentation?
Diez B. Roggisch
deets at nospam.web.de
Mon May 5 06:22:38 EDT 2008
ETP wrote:
> I have a little robot project I'm programming in python using the
> Lynxmotion SSC-32 servo controller via serial. I'd like to use a USB
> game controller (PS2 style) to control the robot.
>
> I've read a number of threads about the difficulty of using USB
> without extensive understanding of the way it works, but a few have
> stated that HID is different somehow. I definitely do not have any
> USB knowledge, and I don't care to get into that. However, if USB-HID
> is much simpler I would love to learn.
>
> I have the python extensions for windows:
> http://sourceforge.net/project/showfiles.php?group_id=78018
> but I haven't found any documentation on how to implement HID in
> python. Can anyone give me some examples or links?
You seem to misunderstand HID. HID is a protocol over USB (and Bluetooth I
believe) that will create user input device events which are mapped to your
OS input layer. That means that whenever you e.g. attach a keyboard device,
it's keyboard events will generate key-strokes on screen.
There are various kinds of HID-devices, and gamepads/joysticks generate
certain events.
So you need to look up you OS game device API and use that. Then attaching
any compliant HID-device should work.
Diez
More information about the Python-list
mailing list