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

◆ loop()

void loop ( )

Definition at line 77 of file Apa102HD.ino.

77 {
78 // Draw a a linear ramp of brightnesses to showcase the difference between
79 // the HD and non-HD mode.
80 for (int i = 0; i < NUM_LEDS; i++) {
81 uint8_t brightness = map(i, 0, NUM_LEDS - 1, 0, 255);
82 CRGB c(brightness, brightness, brightness); // Just make a shade of white.
83 leds_hd[i] = c; // The APA102HD leds do their own gamma correction.
84 CRGB c_gamma_corrected = software_gamma(c);
85 leds[i] = c_gamma_corrected; // Set the software gamma corrected
86 // values to the other strip.
87 }
88 FastLED.show(); // All leds are now written out.
89 delay(8); // Wait 8 milliseconds until the next frame.
90}
#define NUM_LEDS
fl::CRGB leds[NUM_LEDS]
fl::UISlider brightness("Brightness", BRIGHTNESS, 0, 255)
CRGB software_gamma(const CRGB &in)
Definition Apa102HD.ino:52
CRGB leds_hd[NUM_LEDS]
Definition Apa102HD.ino:46
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
fl::CRGB CRGB
Definition crgb.h:25
MapRedBlackTree< Key, T, Compare, fl::allocator_slab< char > > map
Definition map.h:283
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
unsigned char uint8_t
Definition s16x16x4.h:209

References brightness, FastLED, leds, leds_hd, NUM_LEDS, and software_gamma().

+ Here is the call graph for this function: