Added delay to make the ESP connect to the WiFi faster

This commit is contained in:
Ruben Andreassen 2018-04-10 19:55:06 +02:00
parent 33f3e0898c
commit 1d1a0cfba2

View File

@ -114,6 +114,10 @@ void setupWiFi()
// Connect to WiFi
WiFi.begin(ap.config.ssid, ap.config.ssidPassword);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
}
// Initialize WiFi and MQTT clients
if (ap.config.isSecure())
client = new WiFiClientSecure();