1.0.3 • Published 6 years ago

node-luxafor2 v1.0.3

Weekly downloads
8
License
MIT
Repository
github
Last release
6 years ago

Luxafor

Control a Luxafor light

Kind: global class

luxafor.init(cb)

Initialize the Luxafor light. Thank you Dave Irvine.

Kind: instance method of Luxafor

ParamTypeDescription
cbNumbercallback to execute

luxafor.simpleColor(char, cb)

Set one of several preset colors from the API

Kind: instance method of Luxafor

ParamTypeDescription
charNumbernumber representing one of the preset colors
cbfunctioncallback to execute

luxafor.color(led, red, green, blue, cb)

Set a color

Kind: instance method of Luxafor

ParamTypeDescription
ledNumber0..6 the light to control
redNumber0..255 red value
greenNumber0..255 green value
blueNumber0..255 blue value
cbfunctioncallback to execute

luxafor.colorFade(led, red, green, blue, time, cb)

Set a color and then fade

Kind: instance method of Luxafor

ParamTypeDescription
ledNumber0..6 the light to control
redNumber0..255 red value
greenNumber0..255 green value
blueNumber0..255 blue value
timeNumber0..255 length of fade effect
cbfunctioncallback to execute

luxafor.strobe(led, red, green, blue, time, repeat, cb)

Make the light strobe

Kind: instance method of Luxafor

ParamTypeDescription
ledNumber0..6 the light to control
redNumber0..255 red value
greenNumber0..255 green value
blueNumber0..255 blue value
timeNumber0..255 length of strobe effect
repeatNumber0..255 number of iterations, 0 is infinite
cbfunctioncallback to execute

luxafor.wave(type, red, green, blue, repeat, speed, cb)

Make the light display a wave pattern

Kind: instance method of Luxafor

ParamTypeDescription
typeNumber0..5 the type of wave
redNumber0..255 red value
greenNumber0..255 green value
blueNumber0..255 blue value
repeatNumber0..255 number of iterations, 0 is infinite
speedNumber0..255 0 is faster
cbfunctioncallback to execute

luxafor.pattern(pattern, repeat, cb)

Run the light through preprogrammed sequences

Kind: instance method of Luxafor

ParamTypeDescription
patternNumber0..8 the preset pattern to use
repeatNumber0..255 number of iterations, 0 is infinite
cbfunctioncallback to execute
1.0.3

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago