nodegpio
v1.0.8
Published
the gpio lib for raspberry pi
Downloads
5
Readme
nodegpio
use:
npm install nodegpio
example 1
var nodegpio=require('nodegpio');
nodegpio.set([
{number:21,type:'out'},
{number:12,type:'in'}
],function(){
nodegpio.out(21,1);
});
example 2
var nodegpio=require('nodegpio');
nodegpio.set([
{number:21,type:'out'},
{number:12,type:'in'}
],function(){
setInterval(function(){
nodegpio.in(12,function(value){
if(value===0){
//console.log('ok');
nodegpio.out(21,1);
}else{
nodegpio.out(21,0);
}
});
},500);
});
新浪微博 @谷三井