Color cycle a NeoPixel (WS2812B) strip w/ Particle Argon/Xenon/Boron
There are many like it, but this one is mine.
enable()
- Turns the NeoPixel strip "on"disable()
- Turns the NeoPixel strip "off"setBrightness(short)
- Set brightness from 1-100, inclusivesetDelay(short)
- Set update delay in ms
Note: Particle Cloud Functions only accept a single
String
value; any args are converted/coerced into the proper data type.
settings
-{String}
: All settings in a JSON object. Properties:enabled
-{bool}
(defaulttrue
): Whether or not the strip is currently enableddelay
-{short}
(default20
): Current delay settingbrightness
-{short}
(default50
): Current brightness setting
- Settings are persisted in EEPROM. Should I be doing this? I have no idea.
setBrightness(0)
just invokesdisable()
. It does not save0
as thebrightness
setting.- Very obviously adapted from Adafruit's "rainbow" example.
Copyright © 2019 Christopher Hiller. Licensed Apache-2.0