src/RGBleds.cpp
void rgbUpdate() {
    int x;
    const uint8_t phaseShift = 10;
    for (x=0; x < ledsPerStrip; x++) {
    int index = (color + x + phaseShift/2) % 180;
    leds.setPixel(x, rainbowColors[index]);
    }
    leds.show();
    color++;
    if(color >= 180) {
    color = 0;
    }
}
// For testing, this function will update the RGB leds to a gradient pattern down the stip of LEDs
// Call rgbUpdate at whatever rate you want the LEDs to cycle through colors.
For testing, this function will update the RGB leds to a gradient pattern down the stip of LEDs
Call rgbUpdate at whatever rate you want the LEDs to cycle through colors.
For testing this function will update the RGB leds to a gradient pattern down the stip of LEDs Call rgbUpdate at whatever rate you want the LEDs to cycle through colors .
void rgbUpdate() {
    int x;
    const uint8_t phaseShift = 10;
    for (x=0; x < ledsPerStrip; x++) {
    int index = (color + x + phaseShift/2) % 180;
    leds.setPixel(x, rainbowColors[index]);
    }
    leds.show();
    color++;
    if(color >= 180) {
    color = 0;
    }
}
void rgbUpdate ( ) { int x ; const uint8_t phaseShift = 10 ; for ( x = 0 ; x < ledsPerStrip ; x ++ ) { int index = ( color + x + phaseShift / 2 ) % 180 ; leds . setPixel ( x , rainbowColors [ index ] ) ; } leds . show ( ) ; color ++ ; if ( color >= 180 ) { color = 0 ; } }
For testing, this function will update the RGB leds to a gradient pattern down the stip of LEDs
Call rgbUpdate at whatever rate you want the LEDs to cycle through colors.
For testing this function will update the RGB leds to a gradient pattern down the stip of LEDs Call rgbUpdate at whatever rate you want the LEDs to cycle through colors .