1.0.3 • Published 6 years ago
node-luxafor2 v1.0.3
Luxafor
Control a Luxafor light
Kind: global class
luxafor.init(cb)
Initialize the Luxafor light. Thank you Dave Irvine.
Kind: instance method of Luxafor
Param | Type | Description |
---|---|---|
cb | Number | callback to execute |
luxafor.simpleColor(char, cb)
Set one of several preset colors from the API
Kind: instance method of Luxafor
Param | Type | Description |
---|---|---|
char | Number | number representing one of the preset colors |
cb | function | callback to execute |
luxafor.color(led, red, green, blue, cb)
Set a color
Kind: instance method of Luxafor
Param | Type | Description |
---|---|---|
led | Number | 0..6 the light to control |
red | Number | 0..255 red value |
green | Number | 0..255 green value |
blue | Number | 0..255 blue value |
cb | function | callback to execute |
luxafor.colorFade(led, red, green, blue, time, cb)
Set a color and then fade
Kind: instance method of Luxafor
Param | Type | Description |
---|---|---|
led | Number | 0..6 the light to control |
red | Number | 0..255 red value |
green | Number | 0..255 green value |
blue | Number | 0..255 blue value |
time | Number | 0..255 length of fade effect |
cb | function | callback to execute |
luxafor.strobe(led, red, green, blue, time, repeat, cb)
Make the light strobe
Kind: instance method of Luxafor
Param | Type | Description |
---|---|---|
led | Number | 0..6 the light to control |
red | Number | 0..255 red value |
green | Number | 0..255 green value |
blue | Number | 0..255 blue value |
time | Number | 0..255 length of strobe effect |
repeat | Number | 0..255 number of iterations, 0 is infinite |
cb | function | callback to execute |
luxafor.wave(type, red, green, blue, repeat, speed, cb)
Make the light display a wave pattern
Kind: instance method of Luxafor
Param | Type | Description |
---|---|---|
type | Number | 0..5 the type of wave |
red | Number | 0..255 red value |
green | Number | 0..255 green value |
blue | Number | 0..255 blue value |
repeat | Number | 0..255 number of iterations, 0 is infinite |
speed | Number | 0..255 0 is faster |
cb | function | callback to execute |
luxafor.pattern(pattern, repeat, cb)
Run the light through preprogrammed sequences
Kind: instance method of Luxafor
Param | Type | Description |
---|---|---|
pattern | Number | 0..8 the preset pattern to use |
repeat | Number | 0..255 number of iterations, 0 is infinite |
cb | function | callback to execute |