124 Serial.println(
"FastLED OTA Example");
125 Serial.println(
"===================");
136 Serial.println(
"Starting Wi-Fi (async mode)...");
138 Serial.println(
"Wi-Fi connecting in background...");
139 Serial.println(
"LEDs will show connection status:");
140 Serial.println(
" - Pulsing blue: Connecting...");
141 Serial.println(
" - Solid green: Connected!");
144 uint8_t failed =
ota.getFailedServices();
146 Serial.println(
"\nWARNING: Some OTA services failed to initialize:");
148 Serial.println(
" - mDNS failed: Device won't be discoverable at hostname.local");
149 Serial.println(
" Try accessing via IP address instead");
152 Serial.println(
" - HTTP server failed: Web OTA unavailable");
153 Serial.println(
" You can still use Arduino IDE OTA (port 3232)");
156 Serial.println(
" - ArduinoOTA failed: IDE OTA unavailable");
157 Serial.println(
" You can still use Web OTA interface");
163 Serial.println(
"Starting OTA services (network assumed configured)...");
165 Serial.println(
"OTA services started successfully");
167 Serial.println(
"OTA services failed to start");
171 uint8_t failed =
ota.getFailedServices();
173 Serial.println(
"\nWARNING: Some OTA services failed to initialize:");
175 Serial.println(
" - mDNS failed: Device won't be discoverable at hostname.local");
176 Serial.println(
" Try accessing via IP address instead");
179 Serial.println(
" - HTTP server failed: Web OTA unavailable");
180 Serial.println(
" You can still use Arduino IDE OTA (port 3232)");
183 Serial.println(
" - ArduinoOTA failed: IDE OTA unavailable");
184 Serial.println(
" You can still use Web OTA interface");
190 ota.onProgress([](
size_t written,
size_t total){
193 msg <<
"OTA Progress: " << written <<
"/" << total <<
" (" << (int)((written * 100) / total) <<
"%)";
196 ota.onError([](
const char* error_msg){
199 msg <<
"OTA error: " << error_msg;
205 msg <<
"OTA state: " << (int)
state;
211 ota.onBeforeReboot([](){
212 Serial.println(
"OTA complete! Preparing to reboot...");
213 Serial.println(
"Saving state and turning off LEDs...");
226 Serial.println(
"Setup complete. Running LED animation...");
238 if (!
ota.isConnected()) {
249 Serial.println(
"\nWi-Fi connected!");
250 Serial.print(
"Access web interface at: http://");
252 Serial.println(
".local/");
fl::UISlider brightness("Brightness", BRIGHTNESS, 0, 255)
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
static const char * OTA_PASS
static const char * WIFI_SSID
static const char * WIFI_PASS
static const char * HOSTNAME
bool wifi_connected_notified
OTA (Over-The-Air) update manager for ESP32 platforms.
const char * c_str() const FL_NO_EXCEPT
void fill_solid(CRGB *targetArray, int numToFill, const CRGB &color) FL_NO_EXCEPT
Fill a range of LEDs with a solid color.
void fill_rainbow(CRGB *targetArray, int numToFill, fl::u8 initialhue, fl::u8 deltahue=5) FL_NO_EXCEPT
Fill a range of LEDs with a rainbow of colors.
LIB8STATIC u8 beatsin8(accum88 beats_per_minute, u8 lowest=0, u8 highest=255, u32 timebase=0, u8 phase_offset=0) FL_NO_EXCEPT
Generates an 8-bit sine wave at a given BPM that oscillates within a given range.
@ HTTP_FAILED
HTTP server failed to start (Web OTA unavailable)
@ MDNS_FAILED
mDNS initialization failed (device not discoverable at hostname.local)
@ ARDUINO_OTA_FAILED
ArduinoOTA initialization failed (IDE OTA unavailable)
Public include for fl::net::OTA.
@ Green
<div style='background:#008000;width:4em;height:4em;'></div>
@ Blue
<div style='background:#0000FF;width:4em;height:4em;'></div>
@ Black
<div style='background:#000000;width:4em;height:4em;'></div>