So I am current connected to AP X and I want to disconnect X and connect to AP Y, so I use
WiFi.disconnect();
while (WiFi.status() == WL_CONNECTED) delay(1000);
to make sure I am disconnected from X.
Why does this cause a WDT I am delay()ing....
Any other better methods?
As a side note.... sometimes it does not WDT and it gets to the famous
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial..print(".");
if (++cnt == 40) {
break;
}
}
type loop, where I bailout if not connected in 20 seconds, however sometimes the "." is printed very fast across the terminal almost like delay() is broken.....
Thoughts? Is it all related?
RichardS
https://epartsconnect.com
Live realtime stock market prediction website. https://www.stocksignalslive.com my latest creation. Uses AI and machine learning.
New site featuring ESP8266 and ESP32 projects. tutorials, and news.
http://EverythingESP.com
ESP8266.com Founder and Administrator
The Mind Factory (get more from your 3D printer)
Home of the ESP8266, ESP8285, and ESP32 microcontrollers....