leap-mqtt

1.0.11 • Public • Published

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());
})

Readme

Keywords

Package Sidebar

Install

npm i leap-mqtt

Weekly Downloads

2

Version

1.0.11

License

ISC

Last publish

Collaborators

  • xujiawen5566