[solved] Exit wifiManager.autoConnect() after timer

I’m using WiFi manager to set the wifi connections for my project that uses Blynk. but the project needs to be set and then later deployed. so it needs to try to set up the WiFi connection then if fail set its self as access point. then if fail it should drop out and run its regular program.

I’ve tried looking through the .CPP file to find the loop thats holding it and adding a counter to exit after X amount of time. but i cant seem to find where its being held up. did a search for if and while statements and nothing jumped out at me.

i’m about to begin going through the code line by line and trying to follow til i find the loop. but if someone else already has done this or knows a quick workaround it would be much appreciated.

1 Like

This was a good lesson to always check the examples before posting, i just took

wifiManager.setTimeout(180);

from the example and put it in my sketch right after

 WiFiManager wifiManager;

with no loop, worked like a charm