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

◆ loop()

void loop ( )

Definition at line 46 of file RGBWEmulated.ino.

46 {
47 static size_t frame_count = 0;
48 int frame_cycle = frame_count % 4;
49 frame_count++;
50
51 CRGB pixel;
52 switch (frame_cycle) {
53 case 0:
54 pixel = CRGB::Red;
55 break;
56 case 1:
57 pixel = CRGB::Green;
58 break;
59 case 2:
60 pixel = CRGB::Blue;
61 break;
62 case 3:
63 pixel = CRGB::White;
64 break;
65 }
66
67 for (int i = -1; i < frame_cycle; ++i) {
68 fillAndShow(pixel);
69 delay(200);
71 delay(200);
72 }
73 delay(1000);
74}
void fillAndShow(CRGB color)
@ White
<div style='background:#FFFFFF;width:4em;height:4em;'></div>
Definition crgb.h:635
@ Green
<div style='background:#008000;width:4em;height:4em;'></div>
Definition crgb.h:547
@ Blue
<div style='background:#0000FF;width:4em;height:4em;'></div>
Definition crgb.h:501
@ Red
<div style='background:#FF0000;width:4em;height:4em;'></div>
Definition crgb.h:611
@ Black
<div style='background:#000000;width:4em;height:4em;'></div>
Definition crgb.h:499
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:54

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

+ Here is the call graph for this function: