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

◆ setup()

void setup ( )

Definition at line 31 of file RGBWW.ino.

31 {
32 Serial.begin(115200);
33 delay(2000); // Upload safety delay.
34
35 // ----- Channels API setup ------------------------------------------------
36 // ChannelOptions.mWhiteCfg is a fl::variant<fl::Empty, Rgbw, Rgbww>.
37 // Assigning Rgbww selects the 5-channel alternative; everything downstream
38 // (encoder, dispatch, driver) routes through the RGBWW pipeline.
41 opts.mWhiteCfg = fl::Rgbww(
42 /* warm_cct */ 2700,
43 /* cool_cct */ 6500,
45 /* placement */ fl::EOrderWW::WwWcEnd // RGB, then warm-W, cool-W
46 );
47
50 DATA_PIN, timing,
52 GRB,
53 opts));
54
55 FastLED.setBrightness(128);
56}
#define NUM_LEDS
fl::CRGB leds[NUM_LEDS]
#define DATA_PIN
Definition ClientReal.h:82
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
constexpr EOrder GRB
Definition eorder.h:19
@ TypicalSMD5050
Typical values for SMD5050 LEDs.
Definition color.h:13
void delay(u32 ms, bool run_async=true) FL_NOEXCEPT
Public delay wrapper that keeps bare Arduino delay() preferred after using fl::delay; while still all...
Definition delay.h:98
@ WwWcEnd
RGB followed by warm-W, cool-W.
Definition rgbww.h:28
constexpr ChipsetTimingConfig makeTimingConfig() FL_NOEXCEPT
Convert compile-time CHIPSET type to runtime timing config.
@ kRGBWWColorimetric
Definition rgbww.h:44
Configuration for a single LED channel.
Definition config.h:163
fl::variant< fl::Empty, Rgbw, Rgbww > mWhiteCfg
White-channel selection (variant): Empty = plain RGB, Rgbw = 4-channel, Rgbww = 5-channel.
Definition options.h:49
Optional channel configuration parameters All fields have sensible defaults and can be overridden as ...
Definition options.h:43
Per-strip RGBWW configuration.
Definition rgbww.h:60
#define Serial
Definition serial.h:304

References DATA_PIN, FastLED, GRB, fl::kRGBWWColorimetric, leds, fl::makeTimingConfig(), fl::ChannelOptions::mCorrection, fl::ChannelOptions::mWhiteCfg, NUM_LEDS, Serial, TypicalSMD5050, and fl::WwWcEnd.

+ Here is the call graph for this function: