usb: Thu Feb 22 20:31:00 2007

Thu Feb 22 20:31:00 2007

I finally picked up one of the popular USB foam-rocket launchers, and started looking for linux code (and, of course, by preference Python code) to talk to it.

Learned a few things right off:

There were a few chunks of useful reference material:

So, I spent an evening understanding the device (and generic USB) parts from David Wilson's work, and working backwards to python code based on Scott Weston's work. is the "zeroeth" version, most of which is useful for playing with in an interactive shell.

Next step: it turns out that the DreamCheeky relies on the driver for "safety" features; when you hit the edge of the range of motion, the device keeps grinding until you make it stop. It does, however, report the value of the four limit switches via handle.interruptRead(endpoint.address, 8), so you just have to check that every so often while you're commanding it.