Nero Punished Miscreants
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

shift-register

1.0.0 • Public • Published

shift-register

Node.js module for reading status of pins from a NTE74HC165 shift register. when pins changed state, the module will emit the shift register pin number that changed and the new value of the pin.

Quickstart

var shiftRegister = require('shift-register');
 
shiftRegister.on('stateChange', (pinData)=>{
        console.log(pinData);
        //pinData value: [{id: 1, value: 0}, {id:2, value: 1}, ...]
})
 
//you can also call the state of the pins directly
console.log(shiftRegister.state);

Install

Easily install the latest via npm:

$ npm install shift-register

install

npm i shift-register

Downloadsweekly downloads

1

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar