84 {
85
86 static uint8_t buffer = 0;
87 uint8_t *
const bufA = &
water[buffer][0];
88 buffer = (buffer + 1) % 2;
89 uint8_t *
const bufB = &
water[buffer][0];
90
91
93
94
96
97
98
100 static uint16_t pal_offset = 0;
101 pal_offset += 256;
103 input += 2;
104 for (uint8_t
x = 0;
x <
WIDTH;
x++) {
106 }
107 }
109}
CFastLED FastLED
Global LED strip management instance.
void process_water(uint8_t *src, uint8_t *dst)
uint16_t XY(uint8_t x, uint8_t y)
void wu_water(uint8_t *const buf, uint16_t x, uint16_t y, uint8_t bright)
CRGB MyColorFromPaletteExtended(const CRGBPalette16 &pal, uint16_t index, uint8_t brightness, TBlendType blendType)
uint8_t water[2][WATERWIDTH *WATERHEIGHT]
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 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.
@ LINEARBLEND
Linear interpolation between palette entries, with wrap-around from end to the beginning again.
const TProgmemRGBPalette16 RainbowColors_p
HSV Rainbow.