Hello -
I am using NodeMCU 1.0 board. When the WiFi router is disconnected or rebooting, the sketch does connect to Blynk automatically. And I know I can send push notifications to the iPhone when device lost connection which is also working great.
The only thing is when WiFi disconnect happens, NodeMCE can’t reach the access point or the WiFi password is invalid, I would like to flash my LED on NodeMCU so I know WiFi cannot be reached. I found several threads in search but seems like they are old. One of the many things I tried is the following but seems the code never reaches there if the WiFi cannot be reached.
void setup()
{
// Debug console
Serial.begin(9600);
// Start Blynk processing
Blynk.begin(auth, ssid, pass);
while (Blynk.connect() == false) {
// Wait until connected
// TODO: This is not detecting if wifi isn't avail. Need to way to blink LED for that
digitalWrite(LED_BUILTIN, HIGH);
delay(100);
digitalWrite(LED_BUILTIN, LOW);
delay(100);
}