9FASTLED_SMART_PTR(Cylon);
16 Cylon(uint16_t num_leds, uint8_t fade_amount = 250, uint8_t delay_ms = 10)
17 :
Fx1d(num_leds), delay_ms(delay_ms), fade_amount(fade_amount) {}
21 if (context.leds ==
nullptr || mNumLeds == 0) {
25 CRGB *leds = context.leds;
28 leds[position] =
CHSV(hue++, 255, 255);
31 for (uint16_t i = 0; i < mNumLeds; i++) {
44 if (position >= int16_t(mNumLeds)) {
45 position = mNumLeds - 2;
51 fl::Str fxName()
const override {
return "Cylon"; }
central include file for FastLED, defines the CFastLED class/object
An animation that moves a single LED back and forth (Larson Scanner effect)
void draw(DrawContext context) override
Implements the FastLED namespace macros.
Implements a simple red square effect for 2D LED grids.
Representation of an HSV pixel (hue, saturation, value (aka brightness)).
Representation of an RGB pixel (Red, Green, Blue)
FASTLED_FORCE_INLINE CRGB & nscale8(uint8_t scaledown)
Scale down a RGB to N/256ths of its current brightness, using "plain math" dimming rules.