From ffc85a81fe11d96bc00908f66280257aebac186f Mon Sep 17 00:00:00 2001 From: Shawn A Date: Thu, 8 Feb 2018 13:18:08 -0600 Subject: [PATCH] remove reset, no reason for it --- .../OnDemandConfigPortal/OnDemandConfigPortal.ino | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/examples/OnDemandConfigPortal/OnDemandConfigPortal.ino b/examples/OnDemandConfigPortal/OnDemandConfigPortal.ino index 1292c35..435deac 100644 --- a/examples/OnDemandConfigPortal/OnDemandConfigPortal.ino +++ b/examples/OnDemandConfigPortal/OnDemandConfigPortal.ino @@ -33,7 +33,7 @@ void loop() { //sets timeout until configuration portal gets turned off //useful to make it all retry or go to sleep //in seconds - //wifiManager.setConfigPortalTimeout(120); + wifiManager.setConfigPortalTimeout(120); //it starts an access point with the specified name //here "AutoConnectAP" @@ -48,16 +48,11 @@ void loop() { if (!wifiManager.startConfigPortal("OnDemandAP")) { Serial.println("failed to connect and hit timeout"); delay(3000); - //reset and try again, or maybe put it to deep sleep - ESP.reset(); - delay(5000); - } - - //if you get here you have connected to the WiFi - Serial.println("connected...yeey :)"); + } else { + //if you get here you have connected to the WiFi + Serial.println("connected...yeey :)"); + } } - // put your main code here, to run repeatedly: - }