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

Function setup

examples/Luminova/Luminova.h:105–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105void setup() {
106 CLEDController *controller =
107 &FastLED.addLeds<LED_TYPE, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS);
108 FastLED.setBrightness(BRIGHTNESS);
109 FastLED.clear(true);
110 // When user adjusts UI, reflect into model speed
111 // Provide screen map to UI with a specific LED diameter
112 fl::XYMap xy = kMatrixSerpentineLayout
113 ? fl::XYMap::constructSerpentine(WIDTH, HEIGHT)
114 : fl::XYMap::constructRectangularGrid(WIDTH, HEIGHT);
115 fl::ScreenMap screenmap = xy.toScreenMap();
116 screenmap.setDiameter(0.15f);
117 controller->setScreenMap(screenmap);
118 // init particles as "dead"
119 for (int i = 0; i < MAXP; ++i)
120 ps[i].alive = false;
121}
122
123
124

Callers

nothing calls this directly

Calls 5

setDiameterMethod · 0.80
setBrightnessMethod · 0.45
clearMethod · 0.45
toScreenMapMethod · 0.45
setScreenMapMethod · 0.45

Tested by

no test coverage detected