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

◆ setup()

void setup ( )

Definition at line 99 of file FireMatrix.h.

99 {
100 Serial.begin(115200); // Initialize serial communication for debugging
101
102 // Initialize the LED strip:
103 // - NEOPIXEL is the LED type
104 // - 3 is the data pin number (for real hardware)
105 // - setScreenMap connects our 2D coordinate system to the 1D LED array
106
107 fl::ScreenMap screen_map = xyMap.toScreenMap();
108 screen_map.setDiameter(0.1f); // Set the diameter for the cylinder (0.2 cm per LED)
109 FastLED.addLeds<NEOPIXEL, 3>(leds, HEIGHT * WIDTH).setScreenMap(screen_map);
110
111 // Apply color correction for more accurate colors on LED strips
112 FastLED.setCorrection(TypicalLEDStrip);
113}
CRGB leds[NUM_LEDS]
Definition Apa102.ino:11
#define WIDTH
Definition Blur2d.ino:9
#define HEIGHT
Definition Blur2d.ino:10
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
Definition FastLED.cpp:62
LED controller for WS2812 LEDs with GRB color order.
Definition FastLED.h:155
void setDiameter(float diameter)
XYMap xyMap
Definition gfx.cpp:8
@ TypicalLEDStrip
Typical values for SMD5050 LEDs.
Definition color.h:19

References FastLED, HEIGHT, leds, fl::ScreenMap::setDiameter(), TypicalLEDStrip, WIDTH, and xyMap.

+ Here is the call graph for this function: