The Leap Motion is a very cool device, but so far we haven’t seen many applications of interacting with physical devices. [Xavier] wanted to control a cute servo animated desk lamp with his hands, and with the help of a Leap and an Arduino he was able to do just that.
The Leap Motion API has a handy feature that will output all its data over a websocket. It’s a very easy way to transfer hand positions with a minimum amount of overhead, and with just a little bit of Node.js, it’s only two lines of code to connect the Leap to a websocket server.
With the Leap data on a web server, the only thing left to do is pulling it down to an Arduino. Again, [Xavier] used Node.js, this time in the form of johnny five, a Javascript-based Arduino framework. After that, it was a simple matter of mapping the data from the Leap to servo movements in [Xavier]’s Pixar-inspired lamp.
Video of the build below.
I imagine this would be cool if you could tie it to OpenCV and get it to follow your pen tip around. Maybe it could be trained to follow an ir led on the top of the pen.
According to the demo videos it will read positioning of a pencil out of the box
I think he means while writing (since it’s a lamp), and the leap motion has upward looking sensors so that won’t work – unless you put it looking downwards maybe but then you need to suspend it in the air.
This is beautiful work!
You’ve just ruined my weekend (in a good way). I must try it!
Needed to do the pixar look up to the camera
Snap your fingers to turn it on and then use your hand to move it where it needs to go. Cool hack.
Could be useful if you hooked it up in your garage while working on the car.
Hmm attaching multiple sensors to a leap motion isn’t a bad idea.
It’s like a Pixar JARVIS! I think this just sold me on the Leap Motion.
Leap Motion をPCの操作にしか使わないなんてもったいない、と思わせる素敵な工作
From a translations I gather you complain that the leap motion needs to be tied to a PC, and it annoys you a bit.
Seems much of the processing is done on the PC rather than in the leap motion, so yes a PC is a requirement and it won’t be easy to get around that I fear, you can’t just connect it to some microcontroller or anything like that.
an ARM Linux binary of the control software will be available (or might already be) for running on BeagleB* etc type devices. presumably running at full processing speed
that’s good news!
Interesting.
I don’t mean that tied to a PC is annoy. (My comment was little bit difficult to translate, sorry.)
My comment meant that this project suggest countless possibilities of Leap Motion, because I had thought that Leap Motion was made for as a PC’s device.
lol @ Node-isassemble Johnny-Five
Gosh, Node.js lets you slap together javascript, web sockets, and piles of interface code libraries, so I guess this maximizes productivity if measured in code-MB/hour. Isn’t there a plain C API that might let you write a one page program to convert sensor readings to serial port IO (with no interpreters and special libraries)? I couldn’t find details on the Leap Motion API.
js is the future :)
> it’s only two lines of code to connect the Leap to a websocket server
Eh, no.
The Leap-software runs the websocket server and the Node.js code connects to it.
would be cool if the lamp could point where your finger is pointing! That’s what I’d aim for
would be fun to do if I had a leap motion. Oh wait, I dont because it got pushed back again
Hey, what IDE is he using?
i’m using sublime text
Pinokio’s sister. https://vimeo.com/53476316