473,325 Members | 2,792 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

USB HID documentation?

ETP
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/showf...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?

Thanks much.
Jun 27 '08 #1
3 3387
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/showf...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
Jun 27 '08 #2
ETP
I don't doubt I misunderstand since most programming jargon goes over
my head.

That said, I'm sure you can guess my OS is Windows and I don't know
what an API is. After a quick search it looks like windows uses
something called DirectInput for gaming devices. Is anyone familiar
with DirectInput? Is it implementable in Python?

Here's my source: http://msdn.microsoft.com/en-us/libr...02(VS.85).aspx

Actually, I found this, too: http://directpython.sourceforge.net/

Sounds like it is very straight forward. i would definitely still
appreciate any comments or suggestions on the best way to implement a
game controller.

Thanks again.
Jun 27 '08 #3
"Diez B. Roggisch" <de***@nospam.web.dewrote:
>
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.
No, it's more than that. HID devices that are not of a type directly
claimed by the operating system (keyboards, mice) can be accessed by
user-mode programs very easily on both Linux and Windows, without writing a
custom driver. For low-bandwidth data sources, USB HID is an excellent way
to provide general-purpose access to a USB device.
--
Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: Daniel R. Smorey Jr. | last post by:
I'm looking for a good place for Python documentation. I'm really lost on why it's so hard to find anything when it comes to me looking up a particular function in Python. My example would be the...
11
by: Steve | last post by:
posted on: comp.lang.python emailed to: docs@python.org I have a suggestion/request that will, I think, improve the Python documentation. Currently, the Python documentation in HTML format is...
24
by: Christopher J. Bottaro | last post by:
This post is just the culmination of my thoughts and discussions with my coworkers on Python. If you are not interested, please skip over it. At my work, we are developing a product from...
0
by: Jeff Levinson [mcsd] | last post by:
I'm an architect for a very large fortune 100 company and we still struggle with the best balance. However, I use a couple of simple guidelines that have worked very well for me in almost all...
0
by: Almoni | last post by:
Hi, I have a few .xsd files that include each other in the following way: <!-- lets call the main schema file AA.xsd and it includes BB.xsd inside it --> <xs:schema...
1
by: Ole Hanson | last post by:
I would like to be able to generate documentation for a custom configuration file (xml) to enable future support engineers to understand applicable values to the various elements inside the...
97
by: Cameron Laird | last post by:
QOTW: "Python makes it easy to implement algorithms." - casevh "Most of the discussion of immutables here seems to be caused by newcomers wanting to copy an idiom from another language which...
0
by: innovasys | last post by:
TORQUAY, DEVON, UK - Innovasys announced the release of Document! X 5, the fifth version of the documentation solution of choice for developers using Microsoft Visual Studio or the .NET Framework....
34
by: nicolasfr | last post by:
Hi, I am a bit disapointed with the current Python online documentation. I have read many messages of people complaining about the documentation, it's lack of examples and the use of complicated...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.