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

◆ setup()

void setup ( )

Definition at line 101 of file Downscale.h.

101 {
102 Serial.begin(115200);
103 auto screenmap = xyMap.toScreenMap();
104 screenmap.setDiameter(.2);
105 FastLED.addLeds<NEOPIXEL, 2>(leds, xyMap.getTotal())
106 .setScreenMap(screenmap);
107 auto screenmap2 = xyMap_Dst.toScreenMap();
108 screenmap.setDiameter(.5);
109 screenmap2.addOffsetY(-HEIGHT / 2);
110 FastLED.addLeds<NEOPIXEL, 3>(leds_downscaled, xyMap_Dst.getTotal())
111 .setScreenMap(screenmap2);
113 // Initialize wave simulation. Please don't use static constructors, keep it
114 // in setup().
115 trigger.click();
117}
fl::XYMap xyMap
fl::CRGB leds[NUM_LEDS]
fl::ScreenMap screenmap
WaveEffect NewWaveSimulation2D(const fl::XYMap &xymap)
Definition wave.cpp:42
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
#define HEIGHT
fl::XYMap xyMap_Dst(WIDTH/2, HEIGHT/2, false)
fl::CRGB leds_downscaled[NUM_LEDS/4]
Definition Downscale.h:38
fl::UIButton trigger("Trigger")
WaveEffect wave_fx
Definition Downscale.h:48
void setupUiCallbacks()
Definition Downscale.h:79
#define Serial
Definition serial.h:304

References FastLED, HEIGHT, leds, leds_downscaled, NewWaveSimulation2D(), screenmap, Serial, setupUiCallbacks(), trigger(), wave_fx, xyMap, and xyMap_Dst().

+ Here is the call graph for this function: