39 u16 brightnessthetainc16 =
beatsin88(203, (25 * 256), (40 * 256));
55 u8 hue8 = hue16 / 256;
57 brightnesstheta16 += brightnessthetainc16;
58 u16 b16 = sin16(brightnesstheta16) + 32768;
60 u16 bri16 = (fl::u32)((fl::u32)b16 * (fl::u32)b16) / 65536;
61 u8 bri8 = (fl::u32)(((fl::u32)bri16) * brightdepth) / 65536;
62 bri8 += (255 - brightdepth);
64 CRGB newcolor =
CHSV(hue8, sat8, bri8);
66 u16 pixelnumber = (
mNumLeds - 1) - i;
::fl::DrawContext DrawContext
void draw(Fx::DrawContext context) override
fl::string fxName() const override
LIB8STATIC u16 beatsin88(accum88 beats_per_minute_88, u16 lowest=0, u16 highest=65535, u32 timebase=0, u16 phase_offset=0) FL_NOEXCEPT
Generates a 16-bit sine wave at a given BPM that oscillates within a given range.
fl::u32 millis()
Universal millisecond timer - returns milliseconds since system startup.
CRGB & nblend(CRGB &existing, const CRGB &overlay, fract8 amountOfOverlay)
Base definition for an LED controller.
#define FASTLED_SHARED_PTR(type)
Representation of an 8-bit RGB pixel (Red, Green, Blue)