 };
 
 uint8_t brightness = 255;
+int _brightness = 255;
 
 Adafruit_NeoPixel strip0 = Adafruit_NeoPixel(PIXEL_COUNT_0, PIXEL_PIN_0, PIXEL_TYPE);
 LEDObject stripObj0 = {{'I', 'N', 'I', 'T'}};

#define SETALL "setAll"
#define LOOPALTERNATE "loopAlternate"
#define LOOPBLOCKS "loopBlocks"
#define LATCHPIXEL "latchPixel"
#define SETPIXEL "setPixel"
#define LATCH "latch"
#define ENDRUN "endrun"
#define SNOW "snow"
#define WEBSOCKET "websocket" //<- finish this
#define SETBRIGHTNESS "setBrightness"
#define USA "usa"
#define LIGHTNING "lightning"


void setup() 
{
    //retrieve persisted state
    EEPROM.get(EEPROM_ADDR_STRIP_0, stripObj0);
    EEPROM.get(EEPROM_ADDR_STRIP_1, stripObj1);
    EEPROM.get(EEPROM_ADDR_STRIP_2, stripObj2);
    EEPROM.get(EEPROM_ADDR_PINS, pinObj);
    EEPROM.get(EEPROM_BRIGHTNESS, brightness);
    _brightness = (int)brightness;

    Serial.begin(9600);  

    strip2.begin();
    strip2.show();

    //regiser cloud variables and the run function
    Particle.function("run", run);
    Particle.variable("action", action, STRING);
    Particle.variable("parameters", parameters, STRING);
    Particle.variable("brightness", &_brightness, INT);

    pinMode(PIN_0, OUTPUT);
    pinMode(PIN_1, OUTPUT);
