This repository has been archived by the owner on Apr 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.h
94 lines (69 loc) · 2.29 KB
/
settings.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// **********************************
// * Ledstrip Settings *
// **********************************
// * Data pins and led count
#define LED_DATA_PIN 3
#define LED_CLOCK_PIN 2
#define BAUD_RATE 115200
// Ledstrip 1
#define LED_COUNT 24
#define LED_PIXEL_ORDER WS2801_RBG
#define HOSTNAME "flipstrip1"
// Ledstrip 2
//#define LED_COUNT 25
//#define LED_PIXEL_ORDER WS2801_RBG
//#define HOSTNAME "flipstrip2"
// Ledstrip 3
//#define LED_COUNT 19
//#define LED_PIXEL_ORDER WS2801_RBG
//#define HOSTNAME "flipstrip3"
// Ledstrip 4
// #define LED_COUNT 45
// #define LED_PIXEL_ORDER WS2801_RBG
// #define HOSTNAME "flipstrip4"
// Ledstrip 5
// #define LED_COUNT 19
// #define LED_PIXEL_ORDER WS2801_RBG
// #define HOSTNAME "flipstrip5"
// * Turn on debug print to serial device
#define DEBUG_PRINT
// * The password used for uploading
#define OTA_PASSWORD "admin"
// * Webserver http port to listen on
#define HTTP_PORT 80
// * Wifi timeout in milliseconds
#define WIFI_TIMEOUT 30000
// * Configure watchdog
#define OSWATCH_RESET_TIME 30
// * To be filled on each loop
static unsigned long last_loop;
// * Startup defaults for the led strip
#define DEFAULT_BASE_COLOR 0xFF5900
#define DEFAULT_BASE_BRIGHTNESS 255
#define DEFAULT_BASE_SPEED 200
#define DEFAULT_BASE_MODE FX_MODE_STATIC
// * Increase / decrease brightness and speed with this amount per click
#define BRIGHTNESS_STEP 15
#define SPEED_STEP 10
// * Define on/off state for ledstrip
#define STATE_OFF "OFF"
#define STATE_ON "ON"
// * MQTT network settings
#define MQTT_MAX_PACKET_SIZE 512
#define MQTT_MAX_RECONNECT_TRIES 10
// * To be filled with EEPROM data
char MQTT_HOST[64] = "";
char MQTT_PORT[6] = "";
char MQTT_USER[32] = "";
char MQTT_PASS[32] = "";
// * MQTT in and out topic based on hostname
char MQTT_IN_TOPIC[14 + strlen(HOSTNAME) + 4]; // * Topic in will be: lights/ws2801/<HOSTNAME>/in
char MQTT_OUT_TOPIC[14 + strlen(HOSTNAME) + 5]; // * Topic out will be: lights/ws2801/<HOSTNAME>/out
// * MQTT Last reconnection counter
long LAST_RECONNECT_ATTEMPT = 0;
// * Buffer size for json input stream
const int BUFFER_SIZE = JSON_OBJECT_SIZE(3) + JSON_OBJECT_SIZE(5) + 215;
// * The result of json parsing in as a char array
char LEDSTRIP_JSON_OUTPUT[100];
// * Will be filled with html for modes listing
String modes = "";