2.0.0 • Published 9 years ago

hungerford v2.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
9 years ago

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

9 years ago

1.0.1

9 years ago