nodegpio

1.0.8 • Public • Published

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

新浪微博 @谷三井

Readme

Keywords

none

Package Sidebar

Install

npm i nodegpio

Weekly Downloads

7

Version

1.0.8

License

ISC

Last publish

Collaborators

  • codetyphon