
pmgeahan has posted Linux drivers for the USB Motion Detector from Make: 16:
Thought others might be interested in this; I built the USB motion detector in MAKE 16. The driver program provided was for Windows and was used to make a presentation work.
In my case, I’m a Linux guy, so I hacked together an executable to drive the detector. Strictly speaking, at least on Ubuntu, there’s already a HID driver for the USBMicro interface, but it doesn’t do anything. This program triggers on the motion and, in this case, takes a photo with your webcam. A security system, if you will.
Anyhow, the program is pretty simple, all told. Couple of caveats: First, this has been tested on an Ubuntu box running 2.6.27-11 only. You need libusb to make this thing work. Also, you need privileges on the USB device. I wasn’t able to find exactly how to make this work on my box (couldn’t figure out which /dev entry to make readable/writable). I chose to run it suid root. I know, not the greatest idea, but it works. If you can figure out what to do, lemme know.
6 thoughts on “Linux drivers for USB Motion Detector from Make: 16”
Comments are closed.
That Linux source code can be used as-is for the intended use in the article (motion detector interface) but can very easily be expanded to use the USBmicro U401 for the other things that the device can do: control of 16 i/o lines, LCD interfacing, SPI (serial peripheral interface) component connection, and 1-wire Dallas device interfacing.
Very nice!
As a 1000% linux user it’s cool that the multi-platform open source software aspect of a project is taken into account. Sometimes in Make projects this is not the case (gentle nudge/hint).
My guess, by the apparently very high level of your expertise (not many folks know how to write a linux USB driver), is that this isn’t anything you don’t already know. That said, this:
http://bricxcc.sourceforge.net/nbc/doc/nxtlinux.txt
is a text file containing instructions for setting up the LEGO NXT under linux. My hunch is that it’s process which could quite easily be adapted to your use. I really don’t know if it will be helpful, or if it’s completely redundant to what you already know.
Also, do you know of any good tutorials on how to write linux software that can access USB, as you’re doing?