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

◆ wavefx_setup()

void wavefx_setup ( )

Definition at line 351 of file wavefx.cpp.

351 {
352 // Create a screen map for visualization in the FastLED web compiler
353 auto screenmap = xyMap.toScreenMap();
354 screenmap.setDiameter(.2); // Set the size of the LEDs in the visualization
355
356 // Initialize the LED strip:
357 // - NEOPIXEL is the LED type
358 // - 2 is the data pin number (for real hardware)
359 // - setScreenMap connects our 2D coordinate system to the 1D LED array
360 FastLED.addLeds<NEOPIXEL, 2>(leds, NUM_LEDS).setScreenMap(screenmap);
361
362 // Add both wave layers to the blender
363 // The order matters - lower layer is added first (background)
364 fxBlend.add(waveFxLower);
365 fxBlend.add(waveFxUpper);
366}
CRGB leds[NUM_LEDS]
Definition Apa102.ino:11
#define NUM_LEDS
Definition Apa102.ino:6
XYMap xyMap(WIDTH, HEIGHT, false)
CFastLED FastLED
Global LED strip management instance.
LED controller for WS2812 LEDs with GRB color order.
Definition FastLED.h:155
Blend2d fxBlend(xyMap)
WaveFx waveFxLower(xyRect, CreateArgsLower())
WaveFx waveFxUpper(xyRect, CreateArgsUpper())

References FastLED, fxBlend, leds, NUM_LEDS, waveFxLower, waveFxUpper, and xyMap.

Referenced by setup().

+ Here is the caller graph for this function: