Closed Vithop closed 3 years ago
Thanks for your PR. But I don't think it's necessary.
The autoconnect() already has the autoconnect waiting loop
while (millis() - startedAt < 10000)
{
//delay(100);
delay(200);
if (WiFi.status() == WL_CONNECTED)
{
float waited = (millis() - startedAt);
LOGWARN1(F("Connected after waiting (s) :"), waited / 1000);
LOGWARN1(F("Local ip ="), WiFi.localIP());
return true;
}
}
also the while forever loop while(WiFi.status() != WL_CONNECTED)
is not good as sometimes, the system loop() still needs to run even if no WiFi.
This is the minimal example, just to show how you can minimize an example, and not expected to be used. It;s better to use the full-fledge example for your use cases.
Please don't hesitate to post other PRs if you find out bugs or enhancements. Very good for a undergrad Student as yourself to participate and contribute. Keep up the good work and sure you'll have a great future.
Thanks for the compliments I look forward to contributing more if I can!
Added a while loop to check when Wifi Manager connects to internet