Arduino based HID

I have tried many different methods to make an Arduino based human interface device (AAC keys, gobetwino, Java robot class) But the best way I found to work really well is using the PS/2 library. I hope my project helps those interested in making their own game controllers:)

Basically I used the ps2dev library and created a keyboard object that simulates a ps/2 keyboard and to make it work with my computer I used an off-the-shelf PS/2 to USB converter for 3 bucks.
The HID "platform" works for linux, mac and windows with any games or software :slight_smile:

Here are some images:

I took a video of playing some games with it and generating keypresses:

Finally, the code and details are all in my blog:
http://siliconrepublic.blogspot.com/

Enjoy and I would love to see any comments :slight_smile:

Very cool! I tried to use a Wii remote for quite sometime and couldn't get the bluetooth to connect reliably. This would be a good alternative. I have a PS/2 USB converter lying around. I'll give it a try sometime. Possibly with my joystick, which has two analog dimensions and one click button.

Thanks liudr! Now I am racking my brains, trying to think of a cool custom game controller design :slight_smile:

Very very cool, nicely done. Clean code also :).

I wonder if it would be possible to emulate an USB-HID, someone proabably already did that ;).

Thanks Mienaart! Actually I spend this whole summer trying out different ways for achieving this. So I realized there are four ways to do so:
1)Emulating a USB device through another micro-controller like Teensy
2)Sending data through Arduino's serial communication to a program such as AACkeys, gobetwino, or a processing sketch running Java Robot class (not so portable and doesnt work with all OSs and games)
3)PS/2 protocol then PS/2 to USB converter like this project
4)connecting a USB cable's device end to a circuit controlled by the Arduino

I tried out 1, 2 and 3 and found 3 to work the best and with the cheapest non-arduino component.

I want to share this summer's knowledge because I really want to see Arduino hobbyists creating awesome game controllers which are way better that whats out there :slight_smile:

I wonder if it would be possible to emulate an USB-HID, someone proabably already did that

Yes, there's a project for doing that in the book "Practical Arduino":

The code for that project came from @follower, one of the Arduino forum admins:

http://code.rancidbacon.com/ProjectLogArduinoUSB

I put up a video on YouTube showing a Nintendo DS touchscreen being used to trigger USB-HID events so it could be used as a custom game controller. It's in the later part of this video:

Nintendo DS Touch Screen + Arduino pretending to be a keyboard - YouTube

Jon
Freetronics: www.freetronics.com