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

◆ bpm()

void fl::DemoReel100::bpm ( CRGB * leds)
inlineprivate

Definition at line 112 of file demoreel100.h.

112 {
113 // colored stripes pulsing at a defined Beats-Per-Minute (BPM)
114 uint8_t BeatsPerMinute = 62;
115 CRGBPalette16 palette = PartyColors_p;
116 uint8_t beat = beatsin8(BeatsPerMinute, 64, 255);
117 for (uint16_t i = 0; i < mNumLeds; i++) {
118 leds[i] =
119 ColorFromPalette(palette, hue + (i * 2), beat - hue + (i * 10));
120 }
121 }
CRGB leds[NUM_LEDS]
Definition Apa102.ino:11
UINumberField palette("Palette", 0, 0, 2)
uint16_t mNumLeds
Definition fx.h:50
LIB8STATIC uint8_t beatsin8(accum88 beats_per_minute, uint8_t lowest=0, uint8_t highest=255, uint32_t timebase=0, uint8_t phase_offset=0)
Generates an 8-bit sine wave at a given BPM that oscillates within a given range.
Definition lib8tion.h:975
CRGB ColorFromPalette(const CRGBPalette16 &pal, uint8_t index, uint8_t brightness, TBlendType blendType)
Get a color from a palette.
const TProgmemRGBPalette16 PartyColors_p
HSV color ramp: blue, purple, pink, red, orange, yellow (and back).

References beatsin8(), ColorFromPalette(), hue, leds, fl::Fx::mNumLeds, palette, and PartyColors_p.

+ Here is the call graph for this function: