Skip to content

JumpYD/leap-mqtt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What's leap-mqtt

======

This is a nodejs module for grasping gesture data from LeapMotion devices,and then send these data to mqtt servers。

Install

$ npm install leap-mqtt

Useage

var LM=require('leap-mqtt');
    Leap2Mqtt=LM.LeapMqtt;
var option={
  username:'username',
  password:'password'
}
var client = LM.getClient('mqtt://MQTTSERVER:PORT',option);
var controller = LM.getController();
    controller.connect();
client.on('connect',function(err,data){
    Leap2Mqtt.sendgesture(client,controller,'LEAP');
})
var LM=require('leap-mqtt');
var option={
  username:'username',
  password:'password'
}
var client2 = LM.getClient('mqtt://MQTTSERVER:PORT',option);
client2.on('connect',function(err,data){
    client2.subscribe('LEAP');
});
client2.on('message', function (topic, data) {
        console.log(data.toString());
})

About

This is a nodejs module for grasping gesture data from LeapMotion devices,and then send these data to mqtt servers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published