Using the Status Lights
There are three status lights on each Bottango control board. The first two are used by the Bottango firmware to communicate feature status and error states. The third light is available for your own custom logic.
Setting the User Status Light
Section titled “Setting the User Status Light”Be sure to include the status lights header:
#include "StatusLights.h"At its most basic, setting the user status light to green looks like this:
#include "StatusLights.h"StatusLights::setDesiredColor(USER_STATUS_LIGHT, STATUS_COLOR_GREEN);The built-in colors you can access are:
#define STATUS_COLOR_GREEN CRGB(7, 83, 0)#define STATUS_COLOR_YELLOW CRGB(137, 93, 0)#define STATUS_COLOR_BLUE CRGB(0, 95, 108)#define STATUS_COLOR_PURPLE CRGB(76, 2, 113)#define STATUS_COLOR_RED CRGB(150, 0, 0)#define STATUS_COLOR_BLACK CRGB(0, 0, 0)Black turns the light off.
You can also use a custom RGB color:
StatusLights::setDesiredColor(USER_STATUS_LIGHT, CRGB(20, 95, 108));The user status light will blink in and out in unison with the other two status lights. You can change it to pulse quickly twice, then fade (the same behavior as the searching for connection status light sequence):
StatusLights::setLightMode(USER_STATUS_LIGHT, StatusLights::LightMode::MODE_PULSE);Or change it back to the original blink pattern:
StatusLights::setLightMode(USER_STATUS_LIGHT, StatusLights::LightMode::MODE_BLINK);