FastLED 3.10.8
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
48 // For ordinary continuous 5-byte RGBWW chipsets:
50 // For TM1812 RGBCCT strips that pack two pixels into each 12-channel IC,
51 // use this instead (issue #995):
52 // auto chipset = fl::makeClockless<fl::TIMING_TM1812_RGBWW_800KHZ>(DATA_PIN);
54 chipset,
56 GRB,
57 opts));
58
59 FastLED.setBrightness(128);
60}
CRGB leds[1]
#define 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_NO_EXCEPT
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
@ kRGBWWColorimetric
Definition rgbww.h:44
constexpr ClocklessChipset makeClockless(int pin) FL_NO_EXCEPT
Build a ClocklessChipset from a compile-time TIMING trait.
Definition config.h:95
Configuration for a single LED channel.
Definition config.h:167
fl::variant< fl::Empty, Rgbw, Rgbww > mWhiteCfg
White-channel selection (variant): Empty = plain RGB, Rgbw = 4-channel, Rgbww = 5-channel.
Definition options.h:99
Optional channel configuration parameters All fields have sensible defaults and can be overridden as ...
Definition options.h:92
#define Serial
Definition serial.h:309

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

+ Here is the call graph for this function: