hungerford

2.0.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i hungerford

Weekly Downloads

1

Version

2.0.0

License

ISC

Last publish

Collaborators

  • jenslind