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

◆ bpm()

void bpm ( )
Examples
DemoReel100.ino.

Definition at line 105 of file DemoReel100.ino.

106{
107 // colored stripes pulsing at a defined Beats-Per-Minute (BPM)
108 uint8_t BeatsPerMinute = 62;
110 uint8_t beat = beatsin8( BeatsPerMinute, 64, 255);
111 for( int i = 0; i < NUM_LEDS; i++) { //9948
112 leds[i] = ColorFromPalette(palette, gHue+(i*2), beat-gHue+(i*10));
113 }
114}
CRGB leds[NUM_LEDS]
Definition Apa102.ino:11
#define NUM_LEDS
Definition Apa102.ino:6
uint8_t gHue
UINumberField palette("Palette", 0, 0, 2)
RGB color palette with 16 discrete values.
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(), gHue, leds, NUM_LEDS, palette, and PartyColors_p.

Referenced by fl::DemoReel100::runPattern().

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