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

◆ setup()

void setup ( )

Definition at line 102 of file Downscale.h.

102 {
103 Serial.begin(115200);
104 auto screenmap = xyMap.toScreenMap();
105 screenmap.setDiameter(.2);
106 FastLED.addLeds<NEOPIXEL, 2>(leds, xyMap.getTotal())
107 .setScreenMap(screenmap);
108 auto screenmap2 = xyMap_Dst.toScreenMap();
109 screenmap.setDiameter(.5);
110 screenmap2.addOffsetY(-HEIGHT / 2);
111 FastLED.addLeds<NEOPIXEL, 3>(leds_downscaled, xyMap_Dst.getTotal())
112 .setScreenMap(screenmap2);
114 // Initialize wave simulation. Please don't use static constructors, keep it
115 // in setup().
116 trigger.click();
118}
CRGB leds[NUM_LEDS]
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
#define HEIGHT
Definition advanced.h:37
LED controller for WS2812 LEDs with GRB color order.
Definition FastLED.h:158
UIButton trigger("Trigger")
WaveEffect wave_fx
Definition Downscale.h:50
void setupUiCallbacks()
Definition Downscale.h:80
XYMap xyMap_Dst(WIDTH/2, HEIGHT/2, false)
CRGB leds_downscaled[NUM_LEDS/4]
Definition Downscale.h:40
WaveEffect NewWaveSimulation2D(const XYMap &xymap)
Definition wave.cpp:42

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

+ Here is the call graph for this function: