Last active
August 22, 2018 03:52
-
-
Save TareObjects/2f7e15fb4d36d354256ef1ad6aa4ae7f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| WiFi.mode(WIFI_STA); | |
| sleep_ms(100); | |
| WiFi.begin(testSSID, testPassword); | |
| int count = 0; | |
| int status; | |
| while ((status = WiFi.status()) != WL_CONNECTED) { | |
| sleep_ms(1000); | |
| count++; | |
| if (count == 5 || status == WL_NO_SSID_AVAIL) { | |
| esp_wifi_restore();//<--- this is important! | |
| WiFi.begin(testSSID, testPassword); | |
| sleep_ms(1000); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment