Try hacking some gamepads ... its cheap and easy. Try [hid].
My project, robotcowboy, http://www.robotcowboy.com/ makes use of hacked gamepads and a custom joy -> OSC daemon in Linux. I'm getting ready to release it soon, so if you use Linux you could try that.
For instance, I cut a gamepad up and wrapped it around my old trumpet. pic1http://www.robotcowboy.com/dump/P1070845.jpg, pic2 http://www.robotcowboy.com/dump/P1070846.jpg, a short pd session with it http://www.robotcowboy.com/dump/1-5-2008_21-30-1_Bleet.mp3
There's lots of cool stuff you can for cheap. Also, old console gamepads (psx, ps2, gamecube) are readily available and all you need is a usb converter. I've found aftermarket playstation controllers the perfect hackables.
What's interesting is that the HID protocol is orders of magnitude faster than using USB-serial to access an Arduino. We figured that out last week preparing for the gamepad hacking workshop at Pickled Feet here in Berlin. This is because gaming is such a huge market, I figure, which really drives the computer hardware industry. But geeks with sensors, they just don't represent much of a market share at all, do they... ;-) And the serial port protocol is pretty old and dusty at this point.
Martin Howse etched up some very simple ATMega8 HID boards based on this design:
http://www.flightsim.com/cgi/kds?$=main/howto/mind.htm
These worked very well with [hid] on Linux and OS X, and they worked with the Windows [joystick] object just fine too.
Total cost approx EUR 3! Very fast and reliable, with two 10 bit and five 8 bit sensor inputs plus room for 24 buttons (according to the original design, however these aren't used on Martin's stripped down board). The author of the original design says that an ATMega16 or greater could have many more sensor inputs (and buttons too). The inputs take 0-5 V DC as control information, so any kind of sensor you can rig up as a voltage divider will work great. Board also provides 0 V and 5 V, from the USB bus.
A savvy person could easily do one of their own, or perhaps I'll convince Martin (CC'ed here) to post his board somewhere.
Enjoy! d.
Daniel Wilcox wrote:
Try hacking some gamepads ... its cheap and easy. Try [hid].
My project, robotcowboy, http://www.robotcowboy.com/ makes use of hacked gamepads and a custom joy -> OSC daemon in Linux. I'm getting ready to release it soon, so if you use Linux you could try that.
For instance, I cut a gamepad up and wrapped it around my old trumpet.
pic1 http://www.robotcowboy.com/dump/P1070845.jpg, pic2 http://www.robotcowboy.com/dump/P1070846.jpg, a short pd session with it http://www.robotcowboy.com/dump/1-5-2008_21-30-1_Bleet.mp3There's lots of cool stuff you can for cheap. Also, old console gamepads (psx, ps2, gamecube) are readily available and all you need is a usb converter. I've found aftermarket playstation controllers the perfect hackables.
-- Dan Wilcox danomatika www.robotcowboy.com http://www.robotcowboy.com
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On Tue, Mar 18, 2008 at 7:34 PM, Derek Holzer derek@umatic.nl wrote:
What's interesting is that the HID protocol is orders of magnitude faster than using USB-serial to access an Arduino. We figured that out last week preparing for the gamepad hacking workshop at Pickled Feet here in Berlin.
This is something I've been wondering about... where does that latency come from on the usb to serial on the arduino. I am using debian Linux with 2.6.17 kernal on a computer that accesses the arduino through /dev/ttyUSB0
The arduino is doing serial communication with a couple of IC's. Even with 24 bits of information sent to an IC using 3-wire interface, the process only takes about a millisecond. The computer interfaces with /dev/ttyUSB0 and sends a command, then waits for information to return.
I poll the device with select(). The round trip time is around 15-16 ms. Only 2-3 ms are actually accounted for in the communication routines, so where does the other 12 ms come from?
(Actually, I have thought about different methods, such as triggering an interrupt from the actual serial port via another pin on the arduino, to indicate that data has been sent. Would it help?)
I think that the linux kernel doesn't check the file very frequently, which gives me this kind of latency, but I don't really know. I wonder, how is the HID interface different? It gets registered as a character device, also, right? Any tricks? fundamental concepts I'm missing?
Chuck
On Mar 18, 2008, at 8:56 PM, Charles Henry wrote:
On Tue, Mar 18, 2008 at 7:34 PM, Derek Holzer derek@umatic.nl wrote:
What's interesting is that the HID protocol is orders of magnitude faster than using USB-serial to access an Arduino. We figured that
out last week preparing for the gamepad hacking workshop at Pickled Feet here in Berlin.This is something I've been wondering about... where does that latency come from on the usb to serial on the arduino. I am using debian Linux with 2.6.17 kernal on a computer that accesses the arduino through /dev/ttyUSB0
The arduino is doing serial communication with a couple of IC's. Even with 24 bits of information sent to an IC using 3-wire interface, the process only takes about a millisecond. The computer interfaces with /dev/ttyUSB0 and sends a command, then waits for information to return.
I poll the device with select(). The round trip time is around 15-16 ms. Only 2-3 ms are actually accounted for in the communication routines, so where does the other 12 ms come from?
(Actually, I have thought about different methods, such as triggering an interrupt from the actual serial port via another pin on the arduino, to indicate that data has been sent. Would it help?)
I think that the linux kernel doesn't check the file very frequently, which gives me this kind of latency, but I don't really know. I wonder, how is the HID interface different? It gets registered as a character device, also, right? Any tricks? fundamental concepts I'm missing?
USB-serial drivers are usually optimized for maximum thruput rather
than low latency and jitter. Basically, they were designed to hook
up modems and the like. USB HID was designed around low latency and
jitter. Most USB HID devices deliver data every 10ms with decently
low jitter.
The best I've been able to get with Arduino/Firmata is 20ms. The
FTDI driver/chip on has a huge and crappy buffer, so lowering the
poll time would actually make it slower with massive jitter. With
the Arduino, you can tie a pin of the Atmel to the FTDI USB chip then
you can flip that pin to force the FTDI to send it's data
(circumventing the buffer). Then you can get reliable 10ms latency,
perhaps lower. Check the arduino forums for docs on that.
.hc
Chuck
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
Using ReBirth is like trying to play an 808 with a long stick. - David Zicarelli