gpio-js
v0.0.10
Published
GPIO.JS is a node library helps developer control GPIO eaiser and faster.
Downloads
26
Readme
GPIO.JS
GPIO.JS is a node library helps developer control GPIO eaiser and faster on Raspberry Pi or other boards supported Node.js.
Get Started
Install
npm install gpio-js
Blink an LED
var GPIO = require('gpio-js');
var led = new GPIO(44, 'out');
setInterval(function() {
led.val(1 - led.val());
}, 1000);
Features
Event-driven Model to Get GPIO Pin Status
var GPIO = require('gpio-js');
var button = new GPIO(18, 'in');
button.on('data', function(value) {
console.log('Button Pin: ' + value);
});