FastLED
3.9.15
Loading...
Searching...
No Matches
◆
loop()
void loop
(
)
Definition at line
28
of file
Apa102.ino
.
28
{
29
// Draw a linear ramp of brightnesses to showcase the difference between
30
// the HD and non-HD mode.
31
for
(
int
i = 0; i <
NUM_LEDS
; i++) {
32
uint8_t
brightness
=
map
(i, 0,
NUM_LEDS
- 1, 0, 255);
33
CRGB
c(
brightness
,
brightness
,
brightness
);
// Just make a shade of white.
34
leds
[i] = c;
35
}
36
FastLED
.show();
// All LEDs are now displayed.
37
delay(8);
// Wait 8 milliseconds until the next frame.
38
}
leds
CRGB leds[NUM_LEDS]
Definition
Apa102.ino:11
NUM_LEDS
#define NUM_LEDS
Definition
Apa102.ino:6
FastLED
CFastLED FastLED
Global LED strip management instance.
Definition
FastLED.cpp:58
brightness
UISlider brightness("Brightness", 255, 0, 255, 1)
fl::anonymous_namespace{frame_tracker.cpp}::map
long map(long x, long in_min, long in_max, long out_min, long out_max)
Definition
frame_tracker.cpp:6
CRGB
Representation of an RGB pixel (Red, Green, Blue)
Definition
crgb.h:54
References
brightness
,
FastLED
,
leds
, and
NUM_LEDS
.
examples
Apa102
Apa102.ino
Generated on Fri Apr 18 2025 03:39:31 for FastLED by
1.13.2