gpio-js

0.0.10 • Public • Published

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

Package Sidebar

Install

npm i gpio-js

Weekly Downloads

1

Version

0.0.10

License

MIT

Last publish

Collaborators

  • evanxd