Skip to content

DecodedCo/leap-arduino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leapmotion + Arduino

Getting leapmotion to talk to arduino.

Top level: Leapmotion makes data available via websockets on ws://127.0.0.1:6437. Node.js can parse this. There is also a Node.js library for talking to Arduino called Johnny-five. You need something called StandardFirmata which standardises commands sent between the Arduino and a host computer, which Johnny-five speaks.

1. Setup

  1. Install nodejs
  2. Run npm install

2. Leapmotion + Node.js

  1. Enable websockets on Leapmotion: Enable websockets on Leapmotion
  2. Run node leap.js
  3. Sit-back and enjoy the raw JSON feed! Example frame in leap.json

3. Arduino + Node.js

  1. Flash the Arduino with StandardFirmata: Install StandardFirmata
  2. Run node arduino.js

4. Arduino + Leapmotion via Node.js

  1. Run node leap-arduino.js (ref @xavier_seignard)
  2. Placing two hands above leap will switch built-in LED on pin 13 on, otherwise off.

5. Leapmotion + Servo (via Arduino and Node.js)

  1. Wire up a servo to pin 9.
  2. Run node servo.js.
  3. Tweak ranges in code if need (servo and leap). Here is a demo video: Leap Servo demo

Resources

About

Getting leapmotion to talk to arduino

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •