hungerford
v2.0.0
Published
Node helper lib for Hungerford
Downloads
4
Readme
Node-hungerford
Talk to Hungerford via Node.js
Install
npm install hungerford
Usage
const hungerford = require('hungerford')
hungergford.setup('/dev/usb')
// When serial connection is established
hungerford.on('ready', () => {
// When a switch is turned on or off
hungerford.on('switch', (data) => {
console.log(data)
// Turn on some leds
hungerford.turnOnLED('green') // Or 'red'
hungerford.turnOffLED('green')
// BLINK ;))))
hungerford.blinkLED('green', 2000) // 2000 = interval in ms
})
})