     }
 }
 
+// V2 is a zeRGBA widget allowing custom color selection
 BLYNK_WRITE(V2) {  // Custom Color
     lightshow.useTransition(&wipe);
     lightshow.useColorPicker(&solid);
+    // sets the color to the selected mode
     solid.setColor(
         param[0].asInt() & 255,
         param[1].asInt() & 255,

    );
}

BLYNK_WRITE(V3) {  // Brightnesss
    brightness.set(param.asInt() & 255);
}

BLYNK_WRITE(V4) {  // Speed
    lightshow.speed(param.asInt() & 255);
}

BLYNK_WRITE(V5) {  // Brightnesss
    noise.setAmplitude(param.asInt() & 255);
}

// This #include statement was automatically added by the Particle IDE.
#include "blynk/blynk.h"

// import the components
#include "lightshow/lightshow.h"
#include "lightshow/transitions.h"
#include "lightshow/color-pickers.h"
#include "lightshow/color-filters.h"

// put your Blynk auth token here
char auth_token[] = "YOUR_AUTH_TOKEN_HERE";

// create the lightshow
LightShow lightshow(PIXEL_COUNT, PIXEL_PORT, PIXEL_TYPE);

// create some color filters
// allows control of the brightness
BrightnessColorFilter brightness;
// adds noise to the output color
NoiseColorFilter noise;

// create various transitions
// ImmediateTransition sets all of the pixels in one cycle
ImmediateTransition immediate;
// WheelTransition sets all of the pixels in one cycle, but shifts the pixels
// within a larger window. It's used to produce the rainbow effect from the
// neopixel examples
WheelTransition wheel(255);
// Sets one pixels color per cycle
WipeTransition wipe;

// create color pickers
// always supplies the specified color to the transition effect
// causes all of the pixels to be set to the same color
SolidColorPicker solid;
// will supply rainbow colors to the transition
RainbowColorPicker rainbow;
// will fade to a random color during the transition
FadeRandomColorPicker fade;

bool blynk_ready = false;

void setup() {
    // setup the lightshow
    lightshow.setup();

    // set the transition speed of the lightshow
    lightshow.speed(100);

    // add the color filters to the lightshow
    // filters are not required and may be left commented out
    lightshow.addColorFilter(&brightness);
    lightshow.addColorFilter(&noise);

    // set the initial transition driver
    lightshow.useTransition(&wheel);
    // set the initial color picker
    lightshow.useColorPicker(&fade);

    // tell the light show to repeat after the transition is done
    lightshow.repeat(true);
}

void loop() {
    //run blynk, initialize if required
    if(blynk_ready) {
        Blynk.run();
    } else if(Particle.connected()) {
        Blynk.begin(auth_token);
        blynk_ready = true;
    }
    // update the lightshow
    lightshow.update();
}

// V1 is a blynk menu containing the following options in this order
// Rainbow
// White
// Red
// Green
// Blue
BLYNK_WRITE(V1) {  // Mode
    int mode = param.asInt();
    if(mode == 1) {  // rainbow selected
        // ensure repeat is enabled to keep the rainbow going
        lightshow.repeat(true);
        // set transition mode to wheel
        lightshow.useTransition(&wheel);
        // set color selector to rainbow
        lightshow.useColorPicker(&rainbow);
    } else {  // solid color selected
        // change repeat to false for solid colors, since setting it once is
        // enough
        lightshow.repeat(false);
        // set the transition to wipe
        lightshow.useTransition(&wipe);
        // set the color to a color based on the blynk selection
        lightshow.useColorPicker(&solid);
        solid.setColor(
            mode == 2? LightShow::toColor(255, 255, 255)  // White
