2017-12-12 20:22:12 +01:00
|
|
|
//#define RGBW
|
2018-01-10 23:57:58 +01:00
|
|
|
#define PIN 2 //strip pin. Only change for ESP32
|
|
|
|
|
|
|
|
//automatically uses the right driver method for each platform
|
|
|
|
#ifdef ARDUINO_ARCH_ESP32
|
2018-01-16 14:48:02 +01:00
|
|
|
#define PIXELMETHOD NeoEsp32BitBangWs2813Method
|
2018-01-10 23:57:58 +01:00
|
|
|
#else
|
|
|
|
#define PIXELMETHOD NeoEsp8266Uart800KbpsMethod
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//selects correct feature for RGB/RGBW
|
|
|
|
#ifdef RGBW
|
|
|
|
#define PIXELFEATURE NeoGrbwFeature
|
|
|
|
#else
|
|
|
|
#define PIXELFEATURE NeoGrbFeature
|
|
|
|
#endif
|
2017-10-28 23:40:06 +02:00
|
|
|
|
2016-12-17 23:43:07 +01:00
|
|
|
/*
|
|
|
|
WS2812FX.h - Library for WS2812 LED effects.
|
|
|
|
|
|
|
|
Harm Aldick - 2016
|
|
|
|
www.aldick.org
|
|
|
|
FEATURES
|
|
|
|
* A lot of blinken modes and counting
|
|
|
|
* WS2812FX can be used as drop-in replacement for Adafruit Neopixel Library
|
|
|
|
NOTES
|
|
|
|
* Uses the Adafruit Neopixel library. Get it here:
|
|
|
|
https://github.com/adafruit/Adafruit_NeoPixel
|
|
|
|
LICENSE
|
|
|
|
The MIT License (MIT)
|
|
|
|
Copyright (c) 2016 Harm Aldick
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
|
|
in the Software without restriction, including without limitation the rights
|
|
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
|
|
all copies or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
THE SOFTWARE.
|
2017-09-18 09:50:18 +02:00
|
|
|
Modified to work with WLED - differs from Github WS2812FX
|
2016-12-17 23:43:07 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef WS2812FX_h
|
|
|
|
#define WS2812FX_h
|
|
|
|
|
|
|
|
#include "Arduino.h"
|
2017-09-18 12:24:31 +02:00
|
|
|
#include <NeoPixelBrightnessBus.h>
|
2016-12-17 23:43:07 +01:00
|
|
|
|
|
|
|
#define DEFAULT_BRIGHTNESS 50
|
|
|
|
#define DEFAULT_MODE 0
|
|
|
|
#define DEFAULT_SPEED 150
|
2017-11-29 23:56:02 +01:00
|
|
|
#define DEFAULT_COLOR 0xFFAA00
|
2016-12-17 23:43:07 +01:00
|
|
|
|
|
|
|
#define SPEED_MIN 0
|
|
|
|
#define SPEED_MAX 255
|
|
|
|
|
|
|
|
#define BRIGHTNESS_MIN 0
|
|
|
|
#define BRIGHTNESS_MAX 255
|
|
|
|
|
2017-11-29 23:56:02 +01:00
|
|
|
#define MODE_COUNT 58
|
2016-12-17 23:43:07 +01:00
|
|
|
|
|
|
|
#define FX_MODE_STATIC 0
|
|
|
|
#define FX_MODE_BLINK 1
|
|
|
|
#define FX_MODE_BREATH 2
|
|
|
|
#define FX_MODE_COLOR_WIPE 3
|
|
|
|
#define FX_MODE_COLOR_WIPE_RANDOM 4
|
|
|
|
#define FX_MODE_RANDOM_COLOR 5
|
|
|
|
#define FX_MODE_SINGLE_DYNAMIC 6
|
|
|
|
#define FX_MODE_MULTI_DYNAMIC 7
|
|
|
|
#define FX_MODE_RAINBOW 8
|
|
|
|
#define FX_MODE_RAINBOW_CYCLE 9
|
|
|
|
#define FX_MODE_SCAN 10
|
|
|
|
#define FX_MODE_DUAL_SCAN 11
|
|
|
|
#define FX_MODE_FADE 12
|
|
|
|
#define FX_MODE_THEATER_CHASE 13
|
|
|
|
#define FX_MODE_THEATER_CHASE_RAINBOW 14
|
|
|
|
#define FX_MODE_RUNNING_LIGHTS 15
|
|
|
|
#define FX_MODE_TWINKLE 16
|
|
|
|
#define FX_MODE_TWINKLE_RANDOM 17
|
|
|
|
#define FX_MODE_TWINKLE_FADE 18
|
|
|
|
#define FX_MODE_TWINKLE_FADE_RANDOM 19
|
|
|
|
#define FX_MODE_SPARKLE 20
|
|
|
|
#define FX_MODE_FLASH_SPARKLE 21
|
|
|
|
#define FX_MODE_HYPER_SPARKLE 22
|
|
|
|
#define FX_MODE_STROBE 23
|
|
|
|
#define FX_MODE_STROBE_RAINBOW 24
|
|
|
|
#define FX_MODE_MULTI_STROBE 25
|
|
|
|
#define FX_MODE_BLINK_RAINBOW 26
|
|
|
|
#define FX_MODE_CHASE_WHITE 27
|
|
|
|
#define FX_MODE_CHASE_COLOR 28
|
|
|
|
#define FX_MODE_CHASE_RANDOM 29
|
|
|
|
#define FX_MODE_CHASE_RAINBOW 30
|
|
|
|
#define FX_MODE_CHASE_FLASH 31
|
|
|
|
#define FX_MODE_CHASE_FLASH_RANDOM 32
|
|
|
|
#define FX_MODE_CHASE_RAINBOW_WHITE 33
|
2018-01-10 23:57:58 +01:00
|
|
|
#define FX_MODE_COLORFUL 34
|
2017-12-14 00:12:02 +01:00
|
|
|
#define FX_MODE_TRAFFIC_LIGHT 35
|
2016-12-17 23:43:07 +01:00
|
|
|
#define FX_MODE_COLOR_SWEEP_RANDOM 36
|
|
|
|
#define FX_MODE_RUNNING_COLOR 37
|
|
|
|
#define FX_MODE_RUNNING_RED_BLUE 38
|
|
|
|
#define FX_MODE_RUNNING_RANDOM 39
|
|
|
|
#define FX_MODE_LARSON_SCANNER 40
|
|
|
|
#define FX_MODE_COMET 41
|
|
|
|
#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
|
2016-12-31 17:36:07 +01:00
|
|
|
#define FX_MODE_FADE_DOWN 47
|
2017-09-18 09:50:18 +02:00
|
|
|
#define FX_MODE_DUAL_COLOR_WIPE_IN_OUT 48
|
|
|
|
#define FX_MODE_DUAL_COLOR_WIPE_IN_IN 49
|
|
|
|
#define FX_MODE_DUAL_COLOR_WIPE_OUT_OUT 50
|
|
|
|
#define FX_MODE_DUAL_COLOR_WIPE_OUT_IN 51
|
|
|
|
#define FX_MODE_CIRCUS_COMBUSTUS 52
|
2017-11-29 23:56:02 +01:00
|
|
|
#define FX_MODE_CUSTOM_CHASE 53
|
|
|
|
#define FX_MODE_CC_ON_RAINBOW 54
|
|
|
|
#define FX_MODE_CC_ON_RAINBOW_CYCLE 55
|
|
|
|
#define FX_MODE_CC_BLINK 56
|
|
|
|
#define FX_MODE_CC_RANDOM 57
|
2016-12-17 23:43:07 +01:00
|
|
|
|
2018-01-09 23:13:29 +01:00
|
|
|
|
2018-01-10 23:57:58 +01:00
|
|
|
class WS2812FX : public NeoPixelBrightnessBus<PIXELFEATURE, PIXELMETHOD> {
|
2016-12-17 23:43:07 +01:00
|
|
|
typedef void (WS2812FX::*mode_ptr)(void);
|
|
|
|
public:
|
2018-01-10 23:57:58 +01:00
|
|
|
WS2812FX(uint16_t n) : NeoPixelBrightnessBus<PIXELFEATURE, PIXELMETHOD>(n,PIN) {
|
|
|
|
|
2016-12-17 23:43:07 +01:00
|
|
|
_mode[FX_MODE_STATIC] = &WS2812FX::mode_static;
|
|
|
|
_mode[FX_MODE_BLINK] = &WS2812FX::mode_blink;
|
|
|
|
_mode[FX_MODE_BREATH] = &WS2812FX::mode_breath;
|
|
|
|
_mode[FX_MODE_COLOR_WIPE] = &WS2812FX::mode_color_wipe;
|
|
|
|
_mode[FX_MODE_COLOR_WIPE_RANDOM] = &WS2812FX::mode_color_wipe_random;
|
|
|
|
_mode[FX_MODE_RANDOM_COLOR] = &WS2812FX::mode_random_color;
|
|
|
|
_mode[FX_MODE_SINGLE_DYNAMIC] = &WS2812FX::mode_single_dynamic;
|
|
|
|
_mode[FX_MODE_MULTI_DYNAMIC] = &WS2812FX::mode_multi_dynamic;
|
|
|
|
_mode[FX_MODE_RAINBOW] = &WS2812FX::mode_rainbow;
|
|
|
|
_mode[FX_MODE_RAINBOW_CYCLE] = &WS2812FX::mode_rainbow_cycle;
|
|
|
|
_mode[FX_MODE_SCAN] = &WS2812FX::mode_scan;
|
|
|
|
_mode[FX_MODE_DUAL_SCAN] = &WS2812FX::mode_dual_scan;
|
|
|
|
_mode[FX_MODE_FADE] = &WS2812FX::mode_fade;
|
|
|
|
_mode[FX_MODE_THEATER_CHASE] = &WS2812FX::mode_theater_chase;
|
|
|
|
_mode[FX_MODE_THEATER_CHASE_RAINBOW] = &WS2812FX::mode_theater_chase_rainbow;
|
|
|
|
_mode[FX_MODE_RUNNING_LIGHTS] = &WS2812FX::mode_running_lights;
|
|
|
|
_mode[FX_MODE_TWINKLE] = &WS2812FX::mode_twinkle;
|
|
|
|
_mode[FX_MODE_TWINKLE_RANDOM] = &WS2812FX::mode_twinkle_random;
|
|
|
|
_mode[FX_MODE_TWINKLE_FADE] = &WS2812FX::mode_twinkle_fade;
|
|
|
|
_mode[FX_MODE_TWINKLE_FADE_RANDOM] = &WS2812FX::mode_twinkle_fade_random;
|
|
|
|
_mode[FX_MODE_SPARKLE] = &WS2812FX::mode_sparkle;
|
|
|
|
_mode[FX_MODE_FLASH_SPARKLE] = &WS2812FX::mode_flash_sparkle;
|
|
|
|
_mode[FX_MODE_HYPER_SPARKLE] = &WS2812FX::mode_hyper_sparkle;
|
|
|
|
_mode[FX_MODE_STROBE] = &WS2812FX::mode_strobe;
|
|
|
|
_mode[FX_MODE_STROBE_RAINBOW] = &WS2812FX::mode_strobe_rainbow;
|
|
|
|
_mode[FX_MODE_MULTI_STROBE] = &WS2812FX::mode_multi_strobe;
|
|
|
|
_mode[FX_MODE_BLINK_RAINBOW] = &WS2812FX::mode_blink_rainbow;
|
|
|
|
_mode[FX_MODE_CHASE_WHITE] = &WS2812FX::mode_chase_white;
|
|
|
|
_mode[FX_MODE_CHASE_COLOR] = &WS2812FX::mode_chase_color;
|
|
|
|
_mode[FX_MODE_CHASE_RANDOM] = &WS2812FX::mode_chase_random;
|
|
|
|
_mode[FX_MODE_CHASE_RAINBOW] = &WS2812FX::mode_chase_rainbow;
|
|
|
|
_mode[FX_MODE_CHASE_FLASH] = &WS2812FX::mode_chase_flash;
|
|
|
|
_mode[FX_MODE_CHASE_FLASH_RANDOM] = &WS2812FX::mode_chase_flash_random;
|
|
|
|
_mode[FX_MODE_CHASE_RAINBOW_WHITE] = &WS2812FX::mode_chase_rainbow_white;
|
2018-01-10 23:57:58 +01:00
|
|
|
_mode[FX_MODE_COLORFUL] = &WS2812FX::mode_colorful;
|
2017-12-14 00:12:02 +01:00
|
|
|
_mode[FX_MODE_TRAFFIC_LIGHT] = &WS2812FX::mode_traffic_light;
|
2016-12-17 23:43:07 +01:00
|
|
|
_mode[FX_MODE_COLOR_SWEEP_RANDOM] = &WS2812FX::mode_color_sweep_random;
|
|
|
|
_mode[FX_MODE_RUNNING_COLOR] = &WS2812FX::mode_running_color;
|
|
|
|
_mode[FX_MODE_RUNNING_RED_BLUE] = &WS2812FX::mode_running_red_blue;
|
|
|
|
_mode[FX_MODE_RUNNING_RANDOM] = &WS2812FX::mode_running_random;
|
|
|
|
_mode[FX_MODE_LARSON_SCANNER] = &WS2812FX::mode_larson_scanner;
|
|
|
|
_mode[FX_MODE_COMET] = &WS2812FX::mode_comet;
|
|
|
|
_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;
|
2016-12-31 21:10:33 +01:00
|
|
|
_mode[FX_MODE_FADE_DOWN] = &WS2812FX::mode_fade_down;
|
2017-09-18 09:50:18 +02:00
|
|
|
_mode[FX_MODE_DUAL_COLOR_WIPE_IN_OUT] = &WS2812FX::mode_dual_color_wipe_in_out;
|
|
|
|
_mode[FX_MODE_DUAL_COLOR_WIPE_IN_IN] = &WS2812FX::mode_dual_color_wipe_in_in;
|
|
|
|
_mode[FX_MODE_DUAL_COLOR_WIPE_OUT_OUT] = &WS2812FX::mode_dual_color_wipe_out_out;
|
|
|
|
_mode[FX_MODE_DUAL_COLOR_WIPE_OUT_IN] = &WS2812FX::mode_dual_color_wipe_out_in;
|
|
|
|
_mode[FX_MODE_CIRCUS_COMBUSTUS] = &WS2812FX::mode_circus_combustus;
|
2017-11-29 23:56:02 +01:00
|
|
|
_mode[FX_MODE_CUSTOM_CHASE] = &WS2812FX::mode_cc_standard;
|
|
|
|
_mode[FX_MODE_CC_ON_RAINBOW] = &WS2812FX::mode_cc_rainbow;
|
|
|
|
_mode[FX_MODE_CC_ON_RAINBOW_CYCLE] = &WS2812FX::mode_cc_cycle;
|
|
|
|
_mode[FX_MODE_CC_BLINK] = &WS2812FX::mode_cc_blink;
|
|
|
|
_mode[FX_MODE_CC_RANDOM] = &WS2812FX::mode_cc_random;
|
2016-12-17 23:43:07 +01:00
|
|
|
|
|
|
|
_mode_index = DEFAULT_MODE;
|
|
|
|
_speed = DEFAULT_SPEED;
|
|
|
|
_brightness = DEFAULT_BRIGHTNESS;
|
|
|
|
_running = false;
|
|
|
|
_led_count = n;
|
|
|
|
_mode_last_call_time = 0;
|
|
|
|
_mode_delay = 0;
|
|
|
|
_color = DEFAULT_COLOR;
|
|
|
|
_mode_color = DEFAULT_COLOR;
|
2017-11-28 15:09:58 +01:00
|
|
|
_color_sec = 0;
|
|
|
|
_mode_color_sec = 0;
|
2017-11-29 23:56:02 +01:00
|
|
|
_cc_fs = true;
|
|
|
|
_cc_fe = false;
|
|
|
|
_cc_is = 0;
|
|
|
|
_cc_i1 = 0;
|
|
|
|
_cc_i2 = n-1;
|
|
|
|
_cc_num1 = 5;
|
|
|
|
_cc_num2 = 5;
|
|
|
|
_cc_step = 1;
|
2016-12-17 23:43:07 +01:00
|
|
|
_counter_mode_call = 0;
|
|
|
|
_counter_mode_step = 0;
|
2017-11-29 23:56:02 +01:00
|
|
|
_counter_cc_step = 0;
|
2017-11-19 15:31:17 +01:00
|
|
|
_fastStandard = false;
|
2016-12-31 00:38:51 +01:00
|
|
|
_locked = new boolean[n];
|
2017-12-14 00:12:02 +01:00
|
|
|
_cronixieDigits = new uint8_t[6];
|
2016-12-17 23:43:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2017-12-14 11:28:15 +01:00
|
|
|
show(void),
|
|
|
|
setPixelColor(uint16_t i, uint8_t r, uint8_t g, uint8_t b),
|
2016-12-17 23:43:07 +01:00
|
|
|
init(void),
|
|
|
|
service(void),
|
|
|
|
start(void),
|
|
|
|
stop(void),
|
|
|
|
setMode(uint8_t m),
|
2017-11-29 23:56:02 +01:00
|
|
|
setCustomChase(uint8_t i1, uint8_t i2, uint8_t is, uint8_t np, uint8_t ns, uint8_t stp, bool fs, bool fe),
|
|
|
|
setCCIndex1(uint8_t i1),
|
|
|
|
setCCIndex2(uint8_t i2),
|
|
|
|
setCCStart(uint8_t is),
|
|
|
|
setCCNum1(uint8_t np),
|
|
|
|
setCCNum2(uint8_t ns),
|
|
|
|
setCCStep(uint8_t stp),
|
|
|
|
setCCFS(bool fs),
|
|
|
|
setCCFE(bool fe),
|
2016-12-17 23:43:07 +01:00
|
|
|
setSpeed(uint8_t s),
|
2018-01-27 23:28:20 +01:00
|
|
|
setIntensity(uint8_t in),
|
2016-12-17 23:43:07 +01:00
|
|
|
increaseSpeed(uint8_t s),
|
|
|
|
decreaseSpeed(uint8_t s),
|
|
|
|
setColor(uint8_t r, uint8_t g, uint8_t b),
|
2017-09-27 21:45:58 +02:00
|
|
|
setColor(uint8_t r, uint8_t g, uint8_t b, uint8_t w),
|
2016-12-17 23:43:07 +01:00
|
|
|
setColor(uint32_t c),
|
2017-11-28 15:09:58 +01:00
|
|
|
setSecondaryColor(uint8_t r, uint8_t g, uint8_t b),
|
|
|
|
setSecondaryColor(uint8_t r, uint8_t g, uint8_t b, uint8_t w),
|
|
|
|
setSecondaryColor(uint32_t c),
|
2016-12-17 23:43:07 +01:00
|
|
|
setBrightness(uint8_t b),
|
|
|
|
increaseBrightness(uint8_t s),
|
|
|
|
decreaseBrightness(uint8_t s),
|
2017-12-14 00:12:02 +01:00
|
|
|
driverModeCronixie(bool b),
|
|
|
|
setCronixieDigits(uint8_t* d),
|
2017-12-19 16:12:51 +01:00
|
|
|
setCronixieBacklight(bool b),
|
2016-12-17 23:43:07 +01:00
|
|
|
setIndividual(int i),
|
2016-12-31 00:38:51 +01:00
|
|
|
setIndividual(int i, uint32_t col),
|
|
|
|
setRange(int i, int i2),
|
|
|
|
setRange(int i, int i2, uint32_t col),
|
|
|
|
lock(int i),
|
|
|
|
lockRange(int i, int i2),
|
|
|
|
lockAll(void),
|
|
|
|
unlock(int i),
|
|
|
|
unlockRange(int i, int i2),
|
2016-12-31 17:36:07 +01:00
|
|
|
unlockAll(void),
|
2017-11-19 15:31:17 +01:00
|
|
|
setFastUpdateMode(bool b),
|
2017-02-04 22:17:28 +01:00
|
|
|
trigger(void),
|
2017-02-24 23:21:48 +01:00
|
|
|
setLedCount(uint16_t i),
|
2016-12-31 17:36:07 +01:00
|
|
|
setFade(int sp);
|
2016-12-17 23:43:07 +01:00
|
|
|
|
|
|
|
boolean
|
2016-12-31 00:38:51 +01:00
|
|
|
isRunning(void),
|
|
|
|
isLocked(int i);
|
2016-12-17 23:43:07 +01:00
|
|
|
|
|
|
|
uint8_t
|
2017-12-11 23:59:12 +01:00
|
|
|
get_random_wheel_index(uint8_t),
|
2016-12-17 23:43:07 +01:00
|
|
|
getMode(void),
|
|
|
|
getSpeed(void),
|
2018-01-27 23:28:20 +01:00
|
|
|
getIntensity(void),
|
2016-12-17 23:43:07 +01:00
|
|
|
getBrightness(void),
|
|
|
|
getModeCount(void);
|
|
|
|
|
|
|
|
uint32_t
|
2017-12-11 23:59:12 +01:00
|
|
|
color_wheel(uint8_t),
|
2016-12-17 23:43:07 +01:00
|
|
|
getColor(void);
|
|
|
|
|
2017-12-14 00:12:02 +01:00
|
|
|
double
|
|
|
|
getPowerEstimate(uint8_t leds, uint32_t c, uint8_t b),
|
|
|
|
getSafePowerMultiplier(double safeMilliAmps, uint8_t leds, uint32_t c, uint8_t b);
|
|
|
|
|
2016-12-17 23:43:07 +01:00
|
|
|
private:
|
|
|
|
|
|
|
|
void
|
2017-09-18 12:24:31 +02:00
|
|
|
begin(void),
|
|
|
|
clear(void),
|
|
|
|
setPixelColor(uint16_t i, uint32_t c),
|
2017-09-27 21:45:58 +02:00
|
|
|
setPixelColor(uint16_t i, uint8_t r, uint8_t g, uint8_t b, uint8_t w),
|
2017-12-14 00:12:02 +01:00
|
|
|
setPixelColorRaw(uint16_t i, uint8_t r, uint8_t g, uint8_t b, uint8_t w),
|
2016-12-31 17:36:07 +01:00
|
|
|
dofade(void),
|
2016-12-17 23:43:07 +01:00
|
|
|
strip_off(void),
|
2016-12-31 00:38:51 +01:00
|
|
|
strip_off_respectLock(void),
|
2016-12-17 23:43:07 +01:00
|
|
|
mode_static(void),
|
|
|
|
mode_blink(void),
|
|
|
|
mode_color_wipe(void),
|
|
|
|
mode_color_wipe_random(void),
|
|
|
|
mode_random_color(void),
|
|
|
|
mode_single_dynamic(void),
|
|
|
|
mode_multi_dynamic(void),
|
|
|
|
mode_breath(void),
|
|
|
|
mode_fade(void),
|
|
|
|
mode_scan(void),
|
|
|
|
mode_dual_scan(void),
|
|
|
|
mode_theater_chase(void),
|
|
|
|
mode_theater_chase_rainbow(void),
|
|
|
|
mode_rainbow(void),
|
|
|
|
mode_rainbow_cycle(void),
|
|
|
|
mode_running_lights(void),
|
|
|
|
mode_twinkle(void),
|
|
|
|
mode_twinkle_random(void),
|
|
|
|
mode_twinkle_fade(void),
|
|
|
|
mode_twinkle_fade_random(void),
|
|
|
|
mode_sparkle(void),
|
|
|
|
mode_flash_sparkle(void),
|
|
|
|
mode_hyper_sparkle(void),
|
|
|
|
mode_strobe(void),
|
|
|
|
mode_strobe_rainbow(void),
|
|
|
|
mode_multi_strobe(void),
|
|
|
|
mode_blink_rainbow(void),
|
|
|
|
mode_chase_white(void),
|
|
|
|
mode_chase_color(void),
|
|
|
|
mode_chase_random(void),
|
|
|
|
mode_chase_rainbow(void),
|
|
|
|
mode_chase_flash(void),
|
|
|
|
mode_chase_flash_random(void),
|
|
|
|
mode_chase_rainbow_white(void),
|
2018-01-10 23:57:58 +01:00
|
|
|
mode_colorful(void),
|
2017-12-14 00:12:02 +01:00
|
|
|
mode_traffic_light(void),
|
2016-12-17 23:43:07 +01:00
|
|
|
mode_color_sweep_random(void),
|
|
|
|
mode_running_color(void),
|
|
|
|
mode_running_red_blue(void),
|
|
|
|
mode_running_random(void),
|
|
|
|
mode_larson_scanner(void),
|
|
|
|
mode_comet(void),
|
|
|
|
mode_fireworks(void),
|
|
|
|
mode_fireworks_random(void),
|
|
|
|
mode_merry_christmas(void),
|
|
|
|
mode_fire_flicker(void),
|
|
|
|
mode_fire_flicker_soft(void),
|
2016-12-31 21:10:33 +01:00
|
|
|
mode_fire_flicker_int(int),
|
2017-09-18 09:50:18 +02:00
|
|
|
mode_fade_down(void),
|
|
|
|
mode_dual_color_wipe_in_out(void),
|
|
|
|
mode_dual_color_wipe_in_in(void),
|
|
|
|
mode_dual_color_wipe_out_out(void),
|
|
|
|
mode_dual_color_wipe_out_in(void),
|
2017-11-29 23:56:02 +01:00
|
|
|
mode_circus_combustus(void),
|
|
|
|
mode_cc_core(void),
|
|
|
|
mode_cc_standard(void),
|
|
|
|
mode_cc_rainbow(void),
|
|
|
|
mode_cc_cycle(void),
|
|
|
|
mode_cc_blink(void),
|
|
|
|
mode_cc_random(void);
|
2016-12-17 23:43:07 +01:00
|
|
|
|
|
|
|
boolean
|
2017-02-04 22:17:28 +01:00
|
|
|
_triggered,
|
2017-11-19 15:31:17 +01:00
|
|
|
_fastStandard,
|
2017-12-14 00:12:02 +01:00
|
|
|
_cronixieMode,
|
2017-12-19 16:12:51 +01:00
|
|
|
_cronixieBacklightEnabled,
|
2017-11-29 23:56:02 +01:00
|
|
|
_cc_fs,
|
|
|
|
_cc_fe,
|
2016-12-17 23:43:07 +01:00
|
|
|
_running;
|
|
|
|
|
2016-12-31 00:38:51 +01:00
|
|
|
boolean*
|
|
|
|
_locked;
|
|
|
|
|
2016-12-17 23:43:07 +01:00
|
|
|
uint8_t
|
2017-09-18 12:24:31 +02:00
|
|
|
minval(uint8_t v, uint8_t w),
|
|
|
|
maxval(uint8_t v, uint8_t w),
|
2016-12-17 23:43:07 +01:00
|
|
|
_mode_index,
|
|
|
|
_speed,
|
2018-01-27 23:28:20 +01:00
|
|
|
_intensity,
|
2017-11-29 23:56:02 +01:00
|
|
|
_cc_i1,
|
|
|
|
_cc_i2,
|
|
|
|
_cc_is,
|
|
|
|
_cc_num1,
|
|
|
|
_cc_num2,
|
|
|
|
_cc_step,
|
2016-12-17 23:43:07 +01:00
|
|
|
_brightness;
|
|
|
|
|
2017-12-14 00:12:02 +01:00
|
|
|
uint8_t*
|
|
|
|
_cronixieDigits;
|
|
|
|
|
2016-12-17 23:43:07 +01:00
|
|
|
uint16_t
|
|
|
|
_led_count;
|
|
|
|
|
|
|
|
uint32_t
|
2017-09-18 12:24:31 +02:00
|
|
|
getPixelColor(uint16_t i),
|
2016-12-17 23:43:07 +01:00
|
|
|
_color,
|
2017-11-28 15:09:58 +01:00
|
|
|
_color_sec,
|
2016-12-17 23:43:07 +01:00
|
|
|
_counter_mode_call,
|
|
|
|
_counter_mode_step,
|
2017-11-29 23:56:02 +01:00
|
|
|
_counter_cc_step,
|
2016-12-17 23:43:07 +01:00
|
|
|
_mode_color,
|
2017-11-28 15:09:58 +01:00
|
|
|
_mode_color_sec,
|
2016-12-31 21:10:33 +01:00
|
|
|
_mode_delay;
|
2016-12-17 23:43:07 +01:00
|
|
|
|
2017-12-14 00:12:02 +01:00
|
|
|
double
|
|
|
|
_cronixieSecMultiplier;
|
|
|
|
|
2016-12-17 23:43:07 +01:00
|
|
|
unsigned long
|
|
|
|
_mode_last_call_time;
|
|
|
|
|
|
|
|
mode_ptr
|
|
|
|
_mode[MODE_COUNT];
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|