FastLED
3.9.15
Loading...
Searching...
No Matches
RGBSetDemo.ino
Go to the documentation of this file.
1
4
5
#include <FastLED.h>
6
#define NUM_LEDS 40
7
8
#ifdef FASTLED_TESTING
9
#define DELAY_MILLIS 1
10
#else
11
#define FASTLED_TESTING 33
12
#endif
13
14
CRGBArray<NUM_LEDS>
leds
;
15
16
void
setup
() {
FastLED
.addLeds<NEOPIXEL,2>(
leds
,
NUM_LEDS
); }
17
18
void
loop
(){
19
static
uint8_t
hue
;
20
for
(
int
i = 0; i <
NUM_LEDS
/2; i++) {
21
// fade everything out
22
leds
.fadeToBlackBy(40);
23
24
// let's set an led value
25
leds
[i] =
CHSV
(
hue
++,255,255);
26
27
// now, let's first 20 leds to the top 20 leds,
28
leds
(
NUM_LEDS
/2,
NUM_LEDS
-1) =
leds
(
NUM_LEDS
/2 - 1 ,0);
29
FastLED
.delay(
FASTLED_TESTING
);
30
}
31
}
setup
void setup()
Definition
AnalogOutput.ino:65
loop
void loop()
Definition
AnalogOutput.ino:54
NUM_LEDS
#define NUM_LEDS
Definition
Animartrix.ino:79
leds
fl::CRGB leds[NUM_LEDS]
Definition
Animartrix.ino:93
FastLED
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
Definition
FastLED.cpp.hpp:75
FASTLED_TESTING
#define FASTLED_TESTING
Definition
RGBSetDemo.ino:11
hue
uint8_t hue
Definition
advanced.h:94
CRGBArray
A version of CPixelView<CRGB> with an included array of CRGB LEDs.
Definition
pixelset.h:496
CHSV
fl::hsv8 CHSV
Definition
chsv.h:11
examples
RGBSetDemo
RGBSetDemo.ino
Generated on Tue Jun 16 2026 00:06:58 for FastLED by
1.13.2