Results 1 to 3 of 3
Most people want to plug a joystick into their computer. Instead, I'm trying to make my linux box look like a HID joystick when I plug it into another computer. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-08-2009 #1
- Join Date
- Sep 2009
Make Linux Emulate a Joystick
Most people want to plug a joystick into their computer. Instead, I'm trying to make my linux box look like a HID joystick when I plug it into another computer. Basically I want some C code running in linux to be able to output joystick commands through the USB HID interface into another computer. Any ideas on how to do this? My one thought so far is to use a HID input device like the "Joystick Emulator, USB keyboard" product from microcontrollershop dot com (sorry, it won't let me post URLs).
This means I need to use a DAC to generate an analog signal, but I would want one that is very simple and cheap since most of them are built to drive audio systems.
Any other approaches? Any recommended DACs for this application?
- 09-09-2009 #2
I have built a USB gamepad using a PIC microcontroller as the core... Something like that would probably be the easiest way to cook up a USB device you can control: for instance you could create a device with two such PICs, acting as two USB devices (one for the Linux host, and one for whatever device you want to have the "joystick") and then make the two PICs talk to each other, ferrying instructions from the Linux host to the game system. (You could even reduce that to a single PIC by communicating to the Linux host using an RS-232 connection, possibly over a USB-serial bridge...)
Another approach would be to take a self-contained USB joystick circuit and feed data to it externally... This would simplify things somewhat as you wouldn't need to create a USB device yourself - but it sounds like you want the joystick data to be analog, which I guess would explain why you're looking for a DAC... That being the case I would just skip the DAC and build a USB joystick circuit that takes digital commands from the Linux host.
- 09-15-2009 #3
- Join Date
- Apr 2009
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
Sorry. Can't help you. I've done just the opposite - made an analog joystick emulate a mouse for X-Windows. In any case, you might be able to do this, but you need full documentation of the protocol / USB messages that are required for this at the very least. In fact, I would try to do it without any D2A conversion hardware if at all possible. As that may be, you haven't provided any where near enough information to go further than this.Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!