#include <FastLED.h>
#ifndef WIDTH
#define WIDTH 16
#endif
#ifndef HEIGHT
#define HEIGHT 16
#endif
#define NUM_LEDS (WIDTH * HEIGHT)
#ifndef PIN_DATA
#define PIN_DATA FL_PIN_CLOCKLESS_1
#endif
static const fl::i32
kOne = 65536L;
static const fl::i32
kTwoPi = 411775L;
static const fl::i32
kPi = 205887L;
static fl::i32
mulQ16(fl::i32 a, fl::i32 b) {
return (fl::i32)(((
fl::i64)a * b) >> 16);
}
static fl::i32
angleAt(
unsigned long t,
unsigned long periodMs) {
}
}
static FixPt polar(fl::i32 cx, fl::i32 cy, fl::i32 r, fl::i32 a) {
return p;
}
const fl::i32 back =
mulQ16(len, 36045L);
for (int k = 0; k < 6; ++k) {
const fl::i32 a = spin + k * (
kTwoPi / 6);
};
}
}
static void drawStar(
float cx,
float cy,
float r,
float spin,
const CRGB& color) {
for (int i = 0; i < 5; ++i) {
const float a = spin + (float)i * (2.0f * 6.2831853f / 5.0f);
}
canvas.drawPolygon(color, star);
}
const float spin = (float)(
t % 9000) * (6.2831853f / 9000.0f);
drawStar(cx, cy, r * 0.28f, -2.0f * spin,
CRGB(0, 120, 255));
}
static const CRGB kColors[3] = {
CRGB(255, 0, 80),
CRGB(255, 200, 0),
CRGB(0, 160, 255)};
for (int layer = 0; layer < 3; ++layer) {
const fl::i32 r =
kR - layer * (
kR / 4);
fl::i32 a =
angleAt(
t, 9000UL - 2000UL * layer);
if (layer & 1) a = -a;
}
}
for (int pass = 0; pass < 2; ++pass) {
for (
int i = 0; i <
kKnotN; ++i) {
}
}
}
typedef void (*
SceneFn)(
unsigned long t);
static const unsigned long kSceneMs = 5000;
}
}
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
static void sceneKnot(unsigned long t)
static const int kNumScenes
static const fl::i32 kOne
static fl::i32 angleAt(unsigned long t, unsigned long periodMs)
fl::PolyPoint< Fix > FixPt
static const fl::i32 kTwoPi
static FixPt polar(fl::i32 cx, fl::i32 cy, fl::i32 r, fl::i32 a)
static fl::i32 mulQ16(fl::i32 a, fl::i32 b)
fl::CanvasRGB canvas(fl::span< CRGB >(leds, NUM_LEDS), WIDTH, HEIGHT)
void(* SceneFn)(unsigned long t)
static void scenePinwheel(unsigned long t)
static void sceneLayers(unsigned long t)
static const SceneFn kScenes[]
static void drawStar(float cx, float cy, float r, float spin, const CRGB &color)
static void sceneStar(unsigned long t)
static const unsigned long kSceneMs
static Fix wrap(fl::i32 a)
#define FL_GFX_POLYGON_DEFAULT_CHUNK
Convenience alias for CRGB canvas — use fl::CanvasRGB for no-template syntax.
constexpr i32 raw() const FL_NO_EXCEPT
FASTLED_FORCE_INLINE s16x16 sin() const FL_NO_EXCEPT
static constexpr FASTLED_FORCE_INLINE s16x16 from_raw(i32 raw) FL_NO_EXCEPT
static FASTLED_FORCE_INLINE void sincos(s16x16 angle, s16x16 &out_sin, s16x16 &out_cos) FL_NO_EXCEPT
void fill_solid(CRGB *targetArray, int numToFill, const CRGB &color) FL_NO_EXCEPT
Fill a range of LEDs with a solid color.
2D antialiased graphics for LED matrices
float sinf(float value) FL_NO_EXCEPT
fl::u32 millis() FL_NO_EXCEPT
Universal millisecond timer - returns milliseconds since system startup.
gfx::PolyPoint< Coord > PolyPoint
Polygon vertex (x, y coordinate pair) for drawPolygon.
float cosf(float value) FL_NO_EXCEPT
@ Black
<div style='background:#000000;width:4em;height:4em;'></div>