// This function sets up a palette of black and white stripes, // using code. Since the palette is effectively an array of // sixteen CRGB colors, the various fill_* functions can be used // to set them up. void SetupBlackAndWhiteStripedPalette() { // 'black out' all 16 palette entries... fill_solid( currentPalette, 16, CRGB::Black); // and set every fourth one to white. currentPalette[0] = CRGB::White; currentPalette[4] = CRGB::White; currentPalette[8] = CRGB::White; currentPalette[12] = CRGB::White; }
void SynchronousFade::draw() { unsigned char hue = (_elapsed / 32) & 0xff; // luckily for us, HUE_MAX_RAINBOW is 255. *solidPixel1 = CHSV(hue, 255, 255); fill_solid(frameBuffer, COUNT_WS2811, CHSV(hue, 255, 255)); hue += 64; *solidPixel2 = CHSV(hue, 255, 255); *solidPixel3 = CHSV(hue, 255, 255); *solidPixel4 = CHSV(hue, 255, 255); }
void Mode::tick() { //rots->tick(); fill_solid( strip, Mode::numLeds, CHSV( 0,0,0)); }