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

◆ loop()

void loop ( )

Definition at line 89 of file Wave2d.h.

89 {
90 // Your code here
91 waveSim.setXCylindrical(xCyclical.value());
92 waveSim.setSpeed(slider);
93 waveSim.setDampening(dampening);
94 waveSim.setHalfDuplex(halfDuplex);
95 waveSim.setSuperSample(getSuperSample());
96 if (button) {
98 }
99
100
102 if (autoTrigger) {
104 }
105 }
106
107 waveSim.update();
108 for (int y = 0; y < HEIGHT; y++) {
109 for (int x = 0; x < WIDTH; x++) {
110 uint8_t value8 = waveSim.getu8(x, y);
111 uint32_t idx = xyMap.mapToIndex(x, y);
112 leds[idx] = CRGB(value8, value8, value8);
113 }
114 }
115 FastLED.show();
116}
CRGB leds[NUM_LEDS]
int y
Definition simple.h:93
int x
Definition simple.h:92
fl::XYMap xyMap
Definition ColorBoost.h:61
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
Definition FastLED.cpp:74
UICheckbox autoTrigger("Auto Trigger", true)
UICheckbox xCyclical("X Is Cyclical", true)
void triggerRipple(WaveSimulation2D &waveSim)
Definition Wave2d.h:78
SuperSample getSuperSample()
Definition Wave2d.h:63
#define WIDTH
Definition advanced.h:36
#define HEIGHT
Definition advanced.h:37
UISlider slider("Speed", 0.18f, 0.0f, 1.0f)
UICheckbox halfDuplex("Half Duplex", false)
WaveSimulation1D waveSim(NUM_LEDS, SuperSample::SUPER_SAMPLE_2X)
UISlider dampening("Dampening", 6.0f, 0.0f, 10.0f, 0.1f)
#define EVERY_N_MILLISECONDS(N)
Alias for EVERY_N_MILLIS.
Definition lib8tion.h:1221
UIButton button("Button")
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:86

References autoTrigger(), button(), dampening(), EVERY_N_MILLISECONDS, FastLED, getSuperSample(), halfDuplex(), HEIGHT, leds, slider(), triggerRipple(), waveSim(), WIDTH, x, xCyclical(), xyMap, and y.

+ Here is the call graph for this function: