78{
79
80
81 static uint16_t sCIStart1, sCIStart2, sCIStart3, sCIStart4;
82 static uint32_t sLastms = 0;
84 uint32_t deltams = ms - sLastms;
85 sLastms = ms;
86 uint16_t speedfactor1 =
beatsin16(3, 179, 269);
87 uint16_t speedfactor2 =
beatsin16(4, 179, 269);
88 uint32_t deltams1 = (deltams * speedfactor1) / 256;
89 uint32_t deltams2 = (deltams * speedfactor2) / 256;
90 uint32_t deltams21 = (deltams1 + deltams2) / 2;
91 sCIStart1 += (deltams1 *
beatsin88(1011,10,13));
92 sCIStart2 -= (deltams21 *
beatsin88(777,8,11));
93 sCIStart3 -= (deltams1 *
beatsin88(501,5,7));
94 sCIStart4 -= (deltams2 *
beatsin88(257,4,6));
95
96
98
99
104
105
107
108
110}
void pacifica_deepen_colors()
CRGBPalette16 pacifica_palette_1
void pacifica_add_whitecaps()
void pacifica_one_layer(CRGBPalette16 &p, uint16_t cistart, uint16_t wavescale, uint8_t bri, uint16_t ioff)
CRGBPalette16 pacifica_palette_2
CRGBPalette16 pacifica_palette_3
LIB8STATIC uint16_t beatsin16(accum88 beats_per_minute, uint16_t lowest=0, uint16_t highest=65535, uint32_t timebase=0, uint16_t phase_offset=0)
Generates a 16-bit sine wave at a given BPM that oscillates within a given range.
LIB8STATIC uint16_t beat16(accum88 beats_per_minute, uint32_t timebase=0)
Generates a 16-bit "sawtooth" wave at a given BPM.
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.
LIB8STATIC uint16_t beatsin88(accum88 beats_per_minute_88, uint16_t lowest=0, uint16_t highest=65535, uint32_t timebase=0, uint16_t phase_offset=0)
Generates a 16-bit sine wave at a given BPM that oscillates within a given range.
void fill_solid(struct CRGB *targetArray, int numToFill, const struct CRGB &color)
Fill a range of LEDs with a solid color.
#define GET_MILLIS
The a number of functions need access to a millisecond counter in order to keep time.
Representation of an RGB pixel (Red, Green, Blue)