59 #define MY_BAUD_RATE 9600
66 #define MY_GATEWAY_ESP8266
68 #define MY_WIFI_SSID "MySSID"
69 #define MY_WIFI_PASSWORD "MyVerySecretPassword"
73 #define MY_HOSTNAME "ESP8266_GW"
89 #define MY_GATEWAY_MAX_CLIENTS 2
96 #define MY_INCLUSION_MODE_FEATURE
101 #define MY_INCLUSION_MODE_DURATION 60
103 #define MY_INCLUSION_MODE_BUTTON_PIN 3
110 #define MY_DEFAULT_ERR_LED_PIN 16 // Error led pin
111 #define MY_DEFAULT_RX_LED_PIN 16 // Receive led pin
112 #define MY_DEFAULT_TX_LED_PIN 16 // the PCB, on board LED
114 #include <ArduinoOTA.h>
120 ArduinoOTA.onStart([]() {
121 Serial.println(
"ArduinoOTA start");
123 ArduinoOTA.onEnd([]() {
124 Serial.println(
"\nArduinoOTA end");
126 ArduinoOTA.onProgress([](
unsigned int progress,
unsigned int total) {
127 Serial.printf(
"OTA Progress: %u%%\r", (progress / (total / 100)));
129 ArduinoOTA.onError([](ota_error_t error) {
130 Serial.printf(
"Error[%u]: ", error);
131 if (error == OTA_AUTH_ERROR) {
132 Serial.println(
"Auth Failed");
133 }
else if (error == OTA_BEGIN_ERROR) {
134 Serial.println(
"Begin Failed");
135 }
else if (error == OTA_CONNECT_ERROR) {
136 Serial.println(
"Connect Failed");
137 }
else if (error == OTA_RECEIVE_ERROR) {
138 Serial.println(
"Receive Failed");
139 }
else if (error == OTA_END_ERROR) {
140 Serial.println(
"End Failed");