GPIO.JS is a node library helps developer control GPIO eaiser and faster.


Keywords
gpio, iot, raspberry pi, linkit
License
MIT
Install
npm install gpio-js@0.0.2

Documentation

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

Supported Boards