Hi,
Is it possible to add code to a standard Duemilanove so that it is seen by Windows as a HID joystick device? I've had a preliminary look around the site and found a few odds and ends but nothing definitive.
Paul.
Hi,
Is it possible to add code to a standard Duemilanove so that it is seen by Windows as a HID joystick device? I've had a preliminary look around the site and found a few odds and ends but nothing definitive.
Paul.
The definitive answer is "no": the USB chip on the board is hard-wired to be a serial port.
But one of those "snippets" you came across is probably a link to a project (called "vusb", I think) that does a low-cost USB interface someone has used to do alternate connections to an Arduino.
No, but look at the Teensy, here: Teensy USB Development Board
You can make the teensy into a HID device.
The word HID takes on special meaning as it is defined as a device class for USB. There is however generic support in Windows for HIDCLASS drivers which is independant of USB. That is you can write a Windows driver that presents itself as a HID device without implementing a full USB driver (e.g. a touch screen driver).
So it is possible, but writing a Windows drivers is not trivial. The protocol however is dcoumented and freely available from the Microsoft web. You will also find skeleton drivers that can help you get started. Such a driver could read its input from USB (using the Arduino supplied USB/serial FTDI driver) and provide joystick/game events in accordance with the HIDCLASS specification.
Thanks for those.
V-USB used to be AVR-USB and can now be found here ... http://www.obdev.at/products/vusb/index-de.html
Unfortunately V-USB charges for commercial use and I'm headed in that direction. Teensy doesn't appear to be open source hardware and I'd need to redesign it onto my PCB.
BenF, I'm liking the challenge! This sounds like the approach that could work for me. Can you point me towards further information?
Paul.
There is however generic support in Windows for HIDCLASS drivers which is independant of USB.
Interesting: I only knew know about "HID" as a USB device type. Are there drivers around for the old RS-232 gamepads and joysticks? It might be simplest to program the Arduino to emulate one of those devices, and use an existing, tested driver.
The "game port" dates back to IBM's haydays, but I haven't seen hardware for that in ages.
Microsoft provides templates (minidrivers) also for HIDCLASS that include most of what you will need - apart from the physical interface. People who actually write drivers however seem to be few and far between. I haven't looked specifically though for HIDCLASS open source.
Well, the teensy itself is not magical. Its a ATMEGA32U4, that has the usb stack built into the chip(unlike a ftdi usb-serial). He posted a schematic, its a pretty basic setup.
What is helpful is the HID examples and HID code he already wrote.
(I'll bet AVRfreaks already has a lot of HID code posted already).
The "game port" dates back to IBM's haydays
Hey, I'm a God Member: I don't mistake a game port for a serial port (unless the picture is too tiny for my middle-aged eyes ;D)
There was a period before USB really became "Universal" when game controllers got too complex for the simple game port interface, and some companies made controllers with RS-232 interfaces. I have a Gravis Stinger I bought a while back to use when I needed a simple serial keyboard for embedded projects. There were a few others, too.
If there are recent drivers for any of those (a bit of a long shot, but I see stranger things just about every week on the Intertubez), emulating it might be an easy answer.
Well, it's possible with a bit help of the V-USB project. Check the site arduino[dot]nl for more informations. One more tip: Unmodified the library won't compile unless you change the file UsbJoystick.h and replace the datatype "byte" into "uchar" for the function sendJoystick(..) and the array reportBuffer[8].