Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

apds-gesture

0.0.1 • Public • Published

APDS Gesture control driver

Example usage:

// example for the apds gesture sensor
var tessel = require('tessel');
var GestureLib = require('../');
var G_THRESHOLD = 15
  , G_SENSITIVITY = 0.5//0.5
  ;
 
var gesture = GestureLib.use(tessel.port['A'], 
    {'threshold': G_THRESHOLD, 'sensitivity': G_SENSITIVITY});
 
gesture.debug = true;
 
gesture.on('ready', function(){
  console.log("found a gesture sensor");
  gesture.setup(function(){
     gesture.readGesture();
  });
});
 
gesture.on('movement', function(dir){
  console.log("Sensed movement", dir);
});
 
gesture.on('error', function (err){
  console.log("Error: ", err);
});

Keywords

none

install

npm i apds-gesture

Downloadsweekly downloads

0

version

0.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar