Skip to content

Commit

Permalink
Added fire flicker effect
Browse files Browse the repository at this point in the history
Random changes in brightness make a nice flame effect, FX 45 is more intense like a campfire while FX 46 is more like a candle. Best with passive lights and few LEDs.
  • Loading branch information
Aircoookie authored Dec 20, 2016
1 parent 51bf114 commit 754e404
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions WS2812FX.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@
#define FX_MODE_FIREWORKS 42
#define FX_MODE_FIREWORKS_RANDOM 43
#define FX_MODE_MERRY_CHRISTMAS 44
#define FX_MODE_FIRE_FLICKER 45
#define FX_MODE_FIRE_FLICKER_SOFT 46


class WS2812FX : public Adafruit_NeoPixel {
Expand Down Expand Up @@ -166,6 +168,8 @@ class WS2812FX : public Adafruit_NeoPixel {
_mode[FX_MODE_FIREWORKS] = &WS2812FX::mode_fireworks;
_mode[FX_MODE_FIREWORKS_RANDOM] = &WS2812FX::mode_fireworks_random;
_mode[FX_MODE_MERRY_CHRISTMAS] = &WS2812FX::mode_merry_christmas;
_mode[FX_MODE_FIRE_FLICKER] = &WS2812FX::mode_fire_flicker;
_mode[FX_MODE_FIRE_FLICKER_SOFT] = &WS2812FX::mode_fire_flicker_soft;

_name[FX_MODE_STATIC] = "Static";
_name[FX_MODE_BLINK] = "Blink";
Expand Down Expand Up @@ -212,6 +216,9 @@ class WS2812FX : public Adafruit_NeoPixel {
_name[FX_MODE_FIREWORKS] = "Fireworks";
_name[FX_MODE_FIREWORKS_RANDOM] = "Fireworks Random";
_name[FX_MODE_MERRY_CHRISTMAS] = "Merry Christmas";
_name[FX_MODE_FIRE_FLICKER] = "Fire Flicker";
_name[FX_MODE_FIRE_FLICKER_SOFT] = "Fire Flicker (soft)";


_mode_index = DEFAULT_MODE;
_speed = DEFAULT_SPEED;
Expand Down Expand Up @@ -305,6 +312,9 @@ class WS2812FX : public Adafruit_NeoPixel {
mode_fireworks(void),
mode_fireworks_random(void),
mode_merry_christmas(void);
mode_fire_flicker(void),
mode_fire_flicker_soft(void),
mode_fire_flicker_int(int),

boolean
_running;
Expand Down

0 comments on commit 754e404

Please sign in to comment.