• I test for an IP address. This could probably be refined, but generally the ESP8266 connects to wifi quickly or not at all, say if the config is wrong:

    if (wifi.getIP().ip != "0.0.0.0") {
      // rest of your code
    } else {
      console.log("not connected to wifi");
    }
    
About

Avatar for user102526 @user102526 started