sync-gpio
v0.0.1
Published
sync-gpio is a node library helps developer control GPIO pins on Raspberry Pi eaiser and faster.
Downloads
3
Readme
sync-gpio
sync-gpio is a node library helps developer control GPIO pins on Raspberry Pi eaiser and faster.
Sample Code
Press a button to light on a LED.
var gpio = require('sync-gpio');
var led = new gpio.Pin(gpio.PIN17, gpio.OUTPUT);
var button = new gpio.Pin(gpio.PIN18, gpio.INPUT);
button.on('data', function(value) {
led.val(value);
console.log('LED Pin: ' + led.val());
});