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

◆ updateLEDs()

void updateLEDs ( )

Definition at line 50 of file ServerReal.h.

50 {
51 switch (state) {
52 case STARTING:
53 fill_solid(leds, NUM_LEDS, fl::CRGB(0, 0, beatsin8(60))); // Blue pulse
54 break;
55 case RUNNING:
56 fill_solid(leds, NUM_LEDS, fl::CRGB(0, 64, 0)); // Green
57 break;
59 fill_solid(leds, NUM_LEDS, fl::CRGB(0, 128, 128)); // Cyan
60 break;
61 case RESPONDED:
62 fill_solid(leds, NUM_LEDS, fl::CRGB(64, 0, 64)); // Purple
63 break;
64 case ERROR:
65 fill_solid(leds, NUM_LEDS, fl::CRGB(64, 0, 0)); // Red
66 break;
67 }
68}
#define NUM_LEDS
fl::CRGB leds[NUM_LEDS]
TestState state
@ RUNNING
Definition ServerReal.h:41
@ REQUEST_RECEIVED
Definition ServerReal.h:42
@ ERROR
Definition ServerReal.h:44
@ RESPONDED
Definition ServerReal.h:43
@ STARTING
Definition ServerReal.h:40
void fill_solid(CRGB *targetArray, int numToFill, const CRGB &color) FL_NOEXCEPT
Fill a range of LEDs with a solid color.
Definition fill.cpp.hpp:9
LIB8STATIC u8 beatsin8(accum88 beats_per_minute, u8 lowest=0, u8 highest=255, u32 timebase=0, u8 phase_offset=0) FL_NOEXCEPT
Generates an 8-bit sine wave at a given BPM that oscillates within a given range.
Definition beat.h:105
Representation of an 8-bit RGB pixel (Red, Green, Blue)
Definition crgb.h:38

References beatsin8(), ERROR, fill_solid(), leds, NUM_LEDS, REQUEST_RECEIVED, RESPONDED, RUNNING, STARTING, and state.

Referenced by loop(), and setup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: