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

◆ setup()

void setup ( )

Definition at line 88 of file Audio.ino.

88 {
89 Serial.begin(115200);
90 // auto screenmap = frameBufferXY.toScreenMap();
91 // screenmap.setDiameter(.2);
92 // FastLED.addLeds<NEOPIXEL, 2>(framebuffer,
93 // NUM_LEDS).setScreenMap(screenmap);
94 auto screenmap = ledsXY.toScreenMap();
95 screenmap.setDiameter(.2);
96
97 decayTimeSeconds.onChanged([](float value) {
98 audioFadeTracker.setDecayTime(value);
99 FASTLED_WARN("Fade time seconds: " << value);
100 });
101 attackTimeSeconds.onChanged([](float value) {
102 audioFadeTracker.setAttackTime(value);
103 FASTLED_WARN("Attack time seconds: " << value);
104 });
105 outputTimeSec.onChanged([](float value) {
106 audioFadeTracker.setOutputTime(value);
107 FASTLED_WARN("Output time seconds: " << value);
108 });
109 FastLED.addLeds<NEOPIXEL, 2>(leds, ledsXY.getTotal())
110 .setScreenMap(screenmap);
111}
CRGB leds[NUM_LEDS]
Definition Apa102.ino:11
UISlider decayTimeSeconds("Fade time Seconds",.1, 0, 4,.02)
UISlider attackTimeSeconds("Attack time Seconds",.1, 0, 4,.02)
XYMap ledsXY(WIDTH/2, HEIGHT/2, IS_SERPINTINE)
MaxFadeTracker audioFadeTracker(attackTimeSeconds.value(), decayTimeSeconds.value(), outputTimeSec.value(), 44100)
UISlider outputTimeSec("outputTimeSec",.17, 0, 2,.01)
CFastLED FastLED
Global LED strip management instance.
Definition FastLED.cpp:58
LED controller for WS2812 LEDs with GRB color order.
Definition FastLED.h:155
#define FASTLED_WARN
Definition warn.h:7

References attackTimeSeconds, audioFadeTracker(), decayTimeSeconds, FastLED, FASTLED_WARN, leds, ledsXY, and outputTimeSec.

+ Here is the call graph for this function: