Animating A Lamp With The Leap Motion

leap

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.

23 thoughts on “Animating A Lamp With The Leap Motion

      1. 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.

    1. 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.

      1. 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

      2. 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.

  1. 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.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.