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

◆ loop()

void loop ( )

Definition at line 42 of file HSVTest.h.

42 {
43
44 uint8_t hue = hueSlider.value();
45 uint8_t saturation = saturationSlider.value();
46 uint8_t value = valueSlider.value();
47
48 if (autoHue.value()) {
49 uint32_t now = millis();
50 uint32_t hue_offset = (now / 100) % 256;
51 hue = hue_offset;
52 hueSlider.setValue(hue);
53 }
54
55 CHSV hsv(hue, saturation, value);
56
57 leds[0] = hsv2rgb_spectrum(hsv);
58 leds[2] = hsv2rgb_rainbow(hsv);
59 leds[4] = hsv2rgb_fullspectrum(hsv);
60
61 FastLED.show();
62}
CRGB leds[NUM_LEDS]
uint8_t hue
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
Definition FastLED.cpp:74
UISlider saturationSlider("Saturation", 255, 0, 255, 1)
UISlider valueSlider("Value", 255, 0, 255, 1)
UICheckbox autoHue("Auto Hue", true)
UISlider hueSlider("Hue", 128, 0, 255, 1)
CRGB hsv2rgb_rainbow(const struct CHSV &hsv)
Definition hsv2rgb.cpp:261
CRGB hsv2rgb_spectrum(const struct CHSV &hsv)
Inline version of hsv2rgb_spectrum which returns a CRGB object.
Definition hsv2rgb.cpp:45
void hsv2rgb_fullspectrum(const struct CHSV &hsv, CRGB &rgb)
Definition hsv2rgb.cpp:494
Representation of an HSV pixel (hue, saturation, value (aka brightness)).
Definition hsv.h:15

References autoHue(), FastLED, hsv2rgb_fullspectrum(), hsv2rgb_rainbow(), hsv2rgb_spectrum(), hue, hueSlider(), leds, saturationSlider(), and valueSlider().

+ Here is the call graph for this function: