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

◆ loop()

void loop ( )

Definition at line 49 of file RGBWEmulated.ino.

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

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: