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

◆ loop()

void loop ( )

Definition at line 48 of file RGBWEmulated.ino.

48 {
49 static size_t frame_count = 0;
50 int frame_cycle = frame_count % 4;
51 frame_count++;
52
53 CRGB pixel;
54 switch (frame_cycle) {
55 case 0:
56 pixel = CRGB::Red;
57 break;
58 case 1:
59 pixel = CRGB::Green;
60 break;
61 case 2:
62 pixel = CRGB::Blue;
63 break;
64 case 3:
65 pixel = CRGB::White;
66 break;
67 }
68
69 for (int i = -1; i < frame_cycle; ++i) {
70 fillAndShow(pixel);
71 delay(200);
73 delay(200);
74 }
75 delay(1000);
76}
void fillAndShow(CRGB color)
fl::CRGB CRGB
Definition crgb.h:25
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
@ Green
<div style='background:#008000;width:4em;height:4em;'></div>
Definition crgb.h:558
@ Red
<div style='background:#FF0000;width:4em;height:4em;'></div>
Definition crgb.h:622
@ Blue
<div style='background:#0000FF;width:4em;height:4em;'></div>
Definition crgb.h:512
@ White
<div style='background:#FFFFFF;width:4em;height:4em;'></div>
Definition crgb.h:646
@ Black
<div style='background:#000000;width:4em;height:4em;'></div>
Definition crgb.h:510

References fl::CRGB::Black, fl::CRGB::Blue, fillAndShow(), fl::CRGB::Green, fl::CRGB::Red, and fl::CRGB::White.

+ Here is the call graph for this function: