/
config-sample.h
57 lines (47 loc) · 1.74 KB
/
config-sample.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
/*
* This is a sample configuration file for the "mqtt_esp8266" light.
*
* Change the settings below and save the file as "config.h"
* You can then upload the code using the Arduino IDE.
*/
// Leave this here. These are the choices for CONFIG_STRIP below.
enum strip {
BRIGHTNESS, // only one color/only white
RGB, // RGB LEDs
RGBW // RGB LEDs with an extra white LED per LED
};
#define CONFIG_STRIP RGB // Choose one of the options from above.
// Pins
// In case of BRIGHTNESS: only WHITE is used
// In case of RGB(W): red, green, blue(, white) is used
// All values need to be present, if they are not needed, set to -1,
// it will be ignored.
#define CONFIG_PIN_RED 0 // For RGB(W)
#define CONFIG_PIN_GREEN 2 // For RGB(W)
#define CONFIG_PIN_BLUE 3 // For RGB(W)
#define CONFIG_PIN_WHITE -1 // For BRIGHTNESS and RGBW
// WiFi
#define CONFIG_WIFI_SSID "{WIFI-SSID}"
#define CONFIG_WIFI_PASS "{WIFI-PASSWORD}"
// MQTT
#define CONFIG_MQTT_HOST "{MQTT-SERVER}"
#define CONFIG_MQTT_USER "{MQTT-USERNAME}"
#define CONFIG_MQTT_PASS "{MQTT-PASSWORD}"
#define CONFIG_MQTT_CLIENT_ID "ESP_LED" // Must be unique on the MQTT network
// MQTT Topics
#define CONFIG_MQTT_TOPIC_STATE "home/ESP_LED"
#define CONFIG_MQTT_TOPIC_SET "home/ESP_LED/set"
#define CONFIG_MQTT_PAYLOAD_ON "ON"
#define CONFIG_MQTT_PAYLOAD_OFF "OFF"
// Miscellaneous
// Default number of flashes if no value was given
#define CONFIG_DEFAULT_FLASH_LENGTH 2
// Number of seconds for one transition in colorfade mode
#define CONFIG_COLORFADE_TIME_SLOW 10
#define CONFIG_COLORFADE_TIME_FAST 3
// Reverse the LED logic
// false: 0 (off) - 255 (bright)
// true: 255 (off) - 0 (bright)
#define CONFIG_INVERT_LED_LOGIC false
// Enables Serial and print statements
#define CONFIG_DEBUG false