LightDisplay
is a Johnny-Five module for controlling a set of lights. Designed to manage everything from a few individual LEDs to large light displays like custom Christmas decorations.
const five = require('johnny-five')
const LightDisplay = require('light-display')(five)
const board = new five.Board()
board.on('ready', () => {
const display = new LightDisplay({
segments: [2, 3, 4]
})
display.start('chase')
})
Four animations come bundled with LightDisplay
:
- blink: Toggles all segments simultaneously.
- chase: Toggles segments in order from first to last so the lights "chase" each other.
- constant: Turns on all segments (doesn't actually animate).
- sparkle: Toggles segments randomly.
Copyright Scott González. Released under the terms of the MIT license.