FastLED 3.10.8
Loading...
Searching...
No Matches

◆ loop()

void loop ( )

Definition at line 43 of file Apa102.ino.

43 {
44 // Draw a linear ramp of brightnesses to showcase the difference between
45 // the HD and non-HD mode.
46 for (int i = 0; i < NUM_LEDS; i++) {
47 uint8_t brightness = map(i, 0, NUM_LEDS - 1, 0, 255);
48 CRGB c(brightness, brightness, brightness); // Just make a shade of white.
49 leds[i] = c;
50 }
51 FastLED.show(); // All LEDs are now displayed.
52 delay(8); // Wait 8 milliseconds until the next frame.
53}
CRGB leds[1]
#define NUM_LEDS
fl::UISlider brightness("Brightness", BRIGHTNESS, 0, 255)
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
fl::CRGB CRGB
Definition crgb.h:25
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
MapRedBlackTree< Key, T, Compare, fl::allocator_slab< char > > map
Definition map.h:283
unsigned char uint8_t
Definition s16x16x4.h:209

References brightness, FastLED, leds, and NUM_LEDS.