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

◆ loop()

void loop ( )

Definition at line 110 of file wasm.ino.

110 {
111 FastLED.setBrightness(!isOff ? brightness.as<uint8_t>() : 0);
112 noisePalette.setSpeed(speed);
113 noisePalette.setScale(scale);
114 fxEngine.setSpeed(timeSpeed);
115
116 if (changeFx) {
117 fxEngine.nextFx();
118 }
119 static int frame = 0;
121 if (changePallete) {
122 noisePalette.changeToRandomPalette();
123 }
124 }
125
126 if (changePalette) {
127 noisePalette.changeToRandomPalette();
128
129 }
130 static int lastFxIndex = -1;
131 if (fxIndex.value() != lastFxIndex) {
132 lastFxIndex = fxIndex;
133 animartrix.fxSet(fxIndex);
134 }
135
136
137 fxEngine.draw(millis(), leds);
138 FastLED.show();
139 frame++;
140}
CRGB leds[NUM_LEDS]
Definition Apa102.ino:11
CFastLED FastLED
Global LED strip management instance.
Definition FastLED.cpp:58
UISlider brightness("Brightness", 255, 0, 255, 1)
UISlider timeSpeed("Time Speed", 1, -10, 10,.1)
FxEngine fxEngine(NUM_LEDS)
Animartrix animartrix(xyMap, FIRST_ANIMATION)
UINumberField fxIndex("Animartrix - index", 0, 0, NUM_ANIMATIONS - 1)
UISlider scale("Scale", 4,.1, 4,.1)
uint16_t speed
Definition Noise.ino:63
NoisePalette noisePalette(xyMap)
#define EVERY_N_MILLISECONDS_DYNAMIC(PERIOD_FUNC)
Checks whether to execute a block of code every N milliseconds, where N is determined dynamically.
Definition lib8tion.h:1364
UISlider changePalletTime("Noise - Time until next random Palette", 5, 1, 100)
UIButton changePalette("Noise - Next Palette")
UICheckbox changePallete("Noise - Auto Palette", true)
UIButton changeFx("Switch between Noise & Animartrix")
UICheckbox isOff("Off", false)

References animartrix, brightness, changeFx, changePalette, changePallete, changePalletTime, EVERY_N_MILLISECONDS_DYNAMIC, FastLED, fxEngine, fxIndex, isOff, leds, noisePalette, scale, speed, and timeSpeed.