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)
@ White
<div style='background:#FFFFFF;width:4em;height:4em;'></div>
Definition crgb.h:703
@ Green
<div style='background:#008000;width:4em;height:4em;'></div>
Definition crgb.h:615
@ Blue
<div style='background:#0000FF;width:4em;height:4em;'></div>
Definition crgb.h:569
@ Red
<div style='background:#FF0000;width:4em;height:4em;'></div>
Definition crgb.h:679
@ Black
<div style='background:#000000;width:4em;height:4em;'></div>
Definition crgb.h:567
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:86

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

+ Here is the call graph for this function: