Skip to content

IBM-Cloud/sample-leapmotion-bluemix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample to connect Leap Motion with Bluemix

The sample-leapmotion-bluemix project contains sample code that shows how to send MQTT commands to IBM Bluemix when gestures are recognized via Leap Motion.

Right now four gestures can be recognized: swipe left, swipe right, screen tap and circle. These gestures can be used, for example, to steer Anki Overdrive cars.

The best way to explain the functionality are pictures. Check out the pictures in the screenshots directory.

alt text

alt text

alt text

The project has been implemented via the Leap Motion JavaScript SDK. MQTT messages are sent via Paho to IBM Bluemix and the Internet of Things foundation.

Via the Internet of Things foundation the commands can be sent to devices like the Anki Overdrive cars. The cars can be connected to the foundation via the separate project Node.js Controller and MQTT API for Anki Overdrive.

Author: Niklas Heidloff @nheidloff

Setup

In order to run this sample you need the Leap Motion device and you need to set up the software.

The sample is just a single HTML file with JavaScript code that can be run locally in web browsers. Via the API it connects to a local web socket server to receive data.

Invoke the following command to download the project.

git clone https://github.com/IBM-Bluemix/sample-leapmotion-bluemix.git

You will need to create an instance of the IBM IoT Foundation service in Bluemix. Within the IoT Foundation dashboard your need to register a new device with the type "leapmotion". After this copy and paste the following data in bluemix.html.

  1. mqttConfig.deviceId
  2. mqttConfig.apiToken
  3. mqttConfig.orgId

In order to steer the Anki Overdrive cars you can import a flow in Node-RED.

About

Sample to connect Leap Motion with Bluemix

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published