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

◆ setup()

void setup ( )

Definition at line 97 of file FireCylinder.h.

97 {
98 Serial.begin(115200); // Initialize serial communication for debugging
99
100 // Initialize the LED strip:
101 // - NEOPIXEL is the LED type
102 // - 3 is the data pin number (for real hardware)
103 // - setScreenMap connects our 2D coordinate system to the 1D LED array
104 fl::ScreenMap screen_map = xyMap.toScreenMap();
105 screen_map.setDiameter(0.1f); // Set the diameter for the cylinder (0.2 cm per LED)
106 FastLED.addLeds<NEOPIXEL, 3>(leds, HEIGHT * WIDTH).setScreenMap(screen_map);
107
108 // Apply color correction for more accurate colors on LED strips
109 FastLED.setCorrection(TypicalLEDStrip);
110}
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: