MCPcopy Create free account
hub / github.com/FastLED/FastLED / loop

Function loop

examples/HSVTest/HSVTest.h:42–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42void loop() {
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}

Callers

nothing calls this directly

Calls 7

hsv2rgb_spectrumFunction · 0.85
hsv2rgb_rainbowFunction · 0.85
hsv2rgb_fullspectrumFunction · 0.85
millisFunction · 0.50
valueMethod · 0.45
setValueMethod · 0.45
showMethod · 0.45

Tested by

no test coverage detected