FastLED 3.9.15
Loading...
Searching...
No Matches

◆ ChangePaletteAndSettingsPeriodically()

void ChangePaletteAndSettingsPeriodically ( )
Examples
NoisePlusPalette.ino.

Definition at line 212 of file NoisePlusPalette.ino.

213{
214 uint8_t secondHand = ((millis() / 1000) / HOLD_PALETTES_X_TIMES_AS_LONG) % 60;
215 static uint8_t lastSecond = 99;
216
217 if( lastSecond != secondHand) {
218 lastSecond = secondHand;
219 if( secondHand == 0) { currentPalette = RainbowColors_p; speed = 20; scale = 30; colorLoop = 1; }
220 if( secondHand == 5) { SetupPurpleAndGreenPalette(); speed = 10; scale = 50; colorLoop = 1; }
221 if( secondHand == 10) { SetupBlackAndWhiteStripedPalette(); speed = 20; scale = 30; colorLoop = 1; }
222 if( secondHand == 15) { currentPalette = ForestColors_p; speed = 8; scale =120; colorLoop = 0; }
223 if( secondHand == 20) { currentPalette = CloudColors_p; speed = 4; scale = 30; colorLoop = 0; }
224 if( secondHand == 25) { currentPalette = LavaColors_p; speed = 8; scale = 50; colorLoop = 0; }
225 if( secondHand == 30) { currentPalette = OceanColors_p; speed = 20; scale = 90; colorLoop = 0; }
226 if( secondHand == 35) { currentPalette = PartyColors_p; speed = 20; scale = 30; colorLoop = 1; }
227 if( secondHand == 40) { SetupRandomPalette(); speed = 20; scale = 20; colorLoop = 1; }
228 if( secondHand == 45) { SetupRandomPalette(); speed = 50; scale = 50; colorLoop = 1; }
229 if( secondHand == 50) { SetupRandomPalette(); speed = 90; scale = 90; colorLoop = 1; }
230 if( secondHand == 55) { currentPalette = RainbowStripeColors_p; speed = 30; scale = 20; colorLoop = 1; }
231 }
232}
CRGBPalette16 currentPalette
void SetupPurpleAndGreenPalette()
void SetupBlackAndWhiteStripedPalette()
UISlider scale("Scale", 4,.1, 4,.1)
uint16_t speed
Definition Noise.ino:63
uint8_t colorLoop
#define HOLD_PALETTES_X_TIMES_AS_LONG
void SetupRandomPalette()
const TProgmemRGBPalette16 RainbowStripeColors_p
HSV Rainbow colors with alternatating stripes of black.
const TProgmemRGBPalette16 OceanColors_p
Ocean colors, blues and whites.
const TProgmemRGBPalette16 CloudColors_p
Cloudy color palette.
const TProgmemRGBPalette16 ForestColors_p
Forest colors, greens.
const TProgmemRGBPalette16 LavaColors_p
Lava color palette.
const TProgmemRGBPalette16 PartyColors_p
HSV color ramp: blue, purple, pink, red, orange, yellow (and back).
const TProgmemRGBPalette16 RainbowColors_p
HSV Rainbow.

References CloudColors_p, colorLoop, currentPalette, ForestColors_p, HOLD_PALETTES_X_TIMES_AS_LONG, LavaColors_p, OceanColors_p, PartyColors_p, RainbowColors_p, RainbowStripeColors_p, scale, SetupBlackAndWhiteStripedPalette(), SetupPurpleAndGreenPalette(), SetupRandomPalette(), and speed.

Referenced by loop().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: