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

◆ loop()

void loop ( )

Definition at line 19 of file Blur.ino.

19 {
20 // Add a bright pixel that moves
21 leds[pos] = CHSV(pos * 2, 255, 255);
22 // Blur the entire strip
23 blur1d(leds, NUM_LEDS, 172);
25 FastLED.show();
26 // Move the position of the dot
27 if (toggle) {
28 pos = (pos + 1) % NUM_LEDS;
29 }
30 toggle = !toggle;
31 delay(20);
32}
CRGB leds[NUM_LEDS]
Definition Apa102.ino:11
#define NUM_LEDS
Definition Apa102.ino:6
uint8_t pos
Definition Blur.ino:11
bool toggle
Definition Blur.ino:12
CFastLED FastLED
Global LED strip management instance.
Definition FastLED.cpp:58
void blur1d(CRGB *leds, uint16_t numLeds, fract8 blur_amount)
One-dimensional blur filter.
void fadeToBlackBy(CRGB *leds, uint16_t num_leds, uint8_t fadeBy)
Reduce the brightness of an array of pixels all at once.
Representation of an HSV pixel (hue, saturation, value (aka brightness)).
Definition chsv.h:16

References blur1d(), fadeToBlackBy(), FastLED, leds, NUM_LEDS, pos, and toggle.

+ Here is the call graph for this function: