Loading the rest of this comparison.

Untitled diff

Created Diff never expires
10 removals
732 lines
7 additions
730 lines
#include <Adafruit_NeoPixel.h>
#include <Adafruit_NeoPixel.h>
#include <ESP8266WiFi.h>
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#include <PubSubClient.h>
#define FASTLED_INTERRUPT_RETRY_COUNT 0
#define FASTLED_INTERRUPT_RETRY_COUNT 0
#include <FastLED.h>
#include <FastLED.h>
#include <ArduinoOTA.h>
#include <ArduinoOTA.h>
#include <ESP8266mDNS.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <WiFiUdp.h>
/************ WIFI and MQTT INFORMATION (CHANGE THESE FOR YOUR SETUP) ******************/
/************ WIFI and MQTT INFORMATION (CHANGE THESE FOR YOUR SETUP) ******************/
#define wifi_ssid "**" //enter your WIFI SSID
#define wifi_ssid "**" //enter your WIFI SSID
#define wifi_password "**" //enter your WIFI Password
#define wifi_password "**" //enter your WIFI Password


/**************************** FOR OTA **************************************************/
/**************************** FOR OTA **************************************************/
#define SENSORNAME "Holiday LED Arduino" //change this to whatever you want to call your device
#define SENSORNAME "Holiday LED Arduino" //change this to whatever you want to call your device
#define OTApassword "**" //the password you will need to enter to upload remotely via the ArduinoIDE
#define OTApassword "**" //the password you will need to enter to upload remotely via the ArduinoIDE
int OTAport = 8266;
int OTAport = 8266;


#define mqtt_server "192.168.145.245" // Enter your MQTT server adderss or IP. I use my DuckDNS adddress (yourname.duckdns.org) in this field
#define mqtt_server "192.168.145.245" // Enter your MQTT server adderss or IP. I use my DuckDNS adddress (yourname.duckdns.org) in this field
#define mqtt_user "**" //enter your MQTT username
#define mqtt_user "**" //enter your MQTT username
#define mqtt_password "**" //enter your password
#define mqtt_password "**" //enter your password


/************ FastLED Defintions ******************/
/************ FastLED Defintions ******************/


#define DATA_PIN D4 //on the NodeMCU 1.0, FastLED will default to the D5 pin after throwing an error during compiling. Leave as is.
#define DATA_PIN D4 //on the NodeMCU 1.0, FastLED will default to the D5 pin after throwing an error during compiling. Leave as is.
#define LED_TYPE WS2812B //change to match your LED type
#define LED_TYPE WS2812B //change to match your LED type
#define COLOR_ORDER GRB //change to match your LED configuration, ws2812 are GRB, 2811 are RGB
#define COLOR_ORDER GRB //change to match your LED configuration, ws2812 are GRB, 2811 are RGB
#define NUM_LEDS 223 //change to match your setup, for multiple runs of LEDs use the number of the run with the most LEDs.
#define NUM_LEDS 223 //change to match your setup, for multiple runs of LEDs use the number of the run with the most LEDs.


///////////////DrZzs Palettes for custom BPM effects//////////////////////////
///////////////DrZzs Palettes for custom BPM effects//////////////////////////
///////////////Add any custom palettes here//////////////////////////////////
///////////////Add any custom palettes here//////////////////////////////////


//Thanksgiving colors
//Thanksgiving colors
// Gradient palette "bhw2_thanks_gp", originally from
// Gradient palette "bhw2_thanks_gp", originally from
// http://soliton.vm.bytemark.co.uk/pub/cpt-city/bhw/bhw2/tn/bhw2_thanks.png.index.html
// http://soliton.vm.bytemark.co.uk/pub/cpt-city/bhw/bhw2/tn/bhw2_thanks.png.index.html
// converted for FastLED with gammas (2.6, 2.2, 2.5)
// converted for FastLED with gammas (2.6, 2.2, 2.5)
// Size: 36 bytes of program space.
// Size: 36 bytes of program space.


DEFINE_GRADIENT_PALETTE( bhw2_thanks_gp ) {
DEFINE_GRADIENT_PALETTE( bhw2_thanks_gp ) {
0, 9, 5, 1,
0, 9, 5, 1,
48, 25, 9, 1,
48, 25, 9, 1,
76, 137, 27, 1,
76, 137, 27, 1,
96, 98, 42, 1,
96, 98, 42, 1,
124, 144, 79, 1,
124, 144, 79, 1,
153, 98, 42, 1,
153, 98, 42, 1,
178, 137, 27, 1,
178, 137, 27, 1,
211, 23, 9, 1,
211, 23, 9, 1,
255, 9, 5, 1};
255, 9, 5, 1};


//Red/Pink colors
//Red/Pink colors
// Gradient palette "bhw2_redrosey_gp", originally from
// Gradient palette "bhw2_redrosey_gp", originally from
// http://soliton.vm.bytemark.co.uk/pub/cpt-city/bhw/bhw2/tn/bhw2_redrosey.png.index.html
// http://soliton.vm.bytemark.co.uk/pub/cpt-city/bhw/bhw2/tn/bhw2_redrosey.png.index.html
// converted for FastLED with gammas (2.6, 2.2, 2.5)
// converted for FastLED with gammas (2.6, 2.2, 2.5)
// Size: 32 bytes of program space.
// Size: 32 bytes of program space.


DEFINE_GRADIENT_PALETTE( bhw2_redrosey_gp ) {
DEFINE_GRADIENT_PALETTE( bhw2_redrosey_gp ) {
0, 103, 1, 10,
0, 103, 1, 10,
33, 109, 1, 12,
33, 109, 1, 12,
76, 159, 5, 48,
76, 159, 5, 48,
119, 175, 55,103,
119, 175, 55,103,
127, 175, 55,103,
127, 175, 55,103,
178, 159, 5, 48,
178, 159, 5, 48,
221, 109, 1, 12,
221, 109, 1, 12,
255, 103, 1, 10};
255, 103, 1, 10};


//Blue to Red - has light blue white and pink
//Blue to Red - has light blue white and pink
// Gradient palette "bluered_gp", originally from
// Gradient palette "bluered_gp", originally from
// http://soliton.vm.bytemark.co.uk/pub/cpt-city/h5/tn/bluered.png.index.html
// http://soliton.vm.bytemark.co.uk/pub/cpt-city/h5/tn/bluered.png.index.html
// converted for FastLED with gammas (2.6, 2.2, 2.5)
// converted for FastLED with gammas (2.6, 2.2, 2.5)
// Size: 12 bytes of program space.
// Size: 12 bytes of program space.


DEFINE_GRADIENT_PALETTE( bluered_gp ) {
DEFINE_GRADIENT_PALETTE( bluered_gp ) {
0, 0, 0,255,
0, 0, 0,255,
127, 255,255,255,
127, 255,255,255,
255, 255, 0, 0};
255, 255, 0, 0};


//Green and Red
//Green and Red
// Gradient palette "bhw2_xmas_gp", originally from
// Gradient palette "bhw2_xmas_gp", originally from
// http://soliton.vm.bytemark.co.uk/pub/cpt-city/bhw/bhw2/tn/bhw2_xmas.png.index.html
// http://soliton.vm.bytemark.co.uk/pub/cpt-city/bhw/bhw2/tn/bhw2_xmas.png.index.html
// converted for FastLED with gammas (2.6, 2.2, 2.5)
// converted for FastLED with gammas (2.6, 2.2, 2.5)
// Size: 48 bytes of program space.
// Size: 48 bytes of program space.


DEFINE_GRADIENT_PALETTE( bhw2_xmas_gp ) {
DEFINE_GRADIENT_PALETTE( bhw2_xmas_gp ) {
0, 0, 12, 0,
0, 0, 12, 0,
40, 0, 55, 0,
40, 0, 55, 0,
66, 1,117, 2,
66, 1,117, 2,
77, 1, 84, 1,
77, 1, 84, 1,
81, 0, 55, 0,
81, 0, 55, 0,
119, 0, 12, 0,
119, 0, 12, 0,
153, 42, 0, 0,
153, 42, 0, 0,
181, 121, 0, 0,
181, 121, 0, 0,
204, 255, 12, 8,
204, 255, 12, 8,
224, 121, 0, 0,
224, 121, 0, 0,
244, 42, 0, 0,
244, 42, 0, 0,
255, 42, 0, 0};
255, 42, 0, 0};


//Purple orange yellow colors
//Purple orange yellow colors
// Gradient palette "bhw2_xc_gp", originally from
// Gradient palette "bhw2_xc_gp", originally from
// http://soliton.vm.bytemark.co.uk/pub/cpt-city/bhw/bhw2/tn/bhw2_xc.png.index.html
// http://soliton.vm.bytemark.co.uk/pub/cpt-city/bhw/bhw2/tn/bhw2_xc.png.index.html
// converted for FastLED with gammas (2.6, 2.2, 2.5)
// converted for FastLED with gammas (2.6, 2.2, 2.5)
// Size: 28 bytes of program space.
// Size: 28 bytes of program space.