MCPcopy Create free account
hub / github.com/FastLED/FastLED / setup

Function setup

examples/EaseInOut/EaseInOut.h:73–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73void setup() {
74 Serial.begin(115200);
75 Serial.println("FastLED Ease16InOutQuad Demo - Simple Curve Visualization");
76
77 // Add LEDs and set screen map
78 auto *controller =
79 &FastLED.addLeds<LED_TYPE, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS);
80
81 // Convert XYMap to ScreenMap and set it on the controller
82 fl::ScreenMap screenMap = xyMap.toScreenMap();
83 screenMap.setDiameter(.5); // Set LED diameter for visualization
84 controller->setScreenMap(screenMap);
85
86 // Configure FastLED
87 FastLED.setBrightness(BRIGHTNESS);
88 FastLED.setCorrection(TypicalLEDStrip);
89 FastLED.setDither(BRIGHTNESS < 255);
90
91 // Set default dropdown selection to "In-Out Quad" (index 3)
92 easeTypeDropdown.setSelectedIndex(3);
93}
94
95void loop() {
96 // Clear the matrix using fl::clear for LedsXY

Callers

nothing calls this directly

Calls 9

setDiameterMethod · 0.80
setDitherMethod · 0.80
beginMethod · 0.45
printlnMethod · 0.45
toScreenMapMethod · 0.45
setScreenMapMethod · 0.45
setBrightnessMethod · 0.45
setCorrectionMethod · 0.45
setSelectedIndexMethod · 0.45

Tested by

no test coverage detected