File tree Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -57,9 +57,6 @@ void setup() {
5757 Serial.println ();
5858
5959 WiFi.disconnect ();
60- // while (WiFi.status() == WL_CONNECTED) {
61- // delay(5);
62- // }
6360
6461// IPAddress ip(192, 168, 1, 177);
6562// IPAddress gw(192, 168, 1, 1);
@@ -95,9 +92,6 @@ void setup() {
9592 }
9693
9794 WiFi.disconnect ();
98- // while (WiFi.status() == WL_CONNECTED) {
99- // delay(5);
100- // }
10195
10296 Serial.println (" Attempting to connect without resetting static IP configuration" ); // <-------
10397 testWiFi ();
@@ -106,9 +100,6 @@ void setup() {
106100 Serial.println ();
107101 }
108102 WiFi.disconnect ();
109- // while (WiFi.status() == WL_CONNECTED) {
110- // delay(5);
111- // }
112103
113104 Serial.print (" Attempting to connect to SSID \" " );
114105 Serial.print (ssid);
@@ -146,9 +137,6 @@ void setup() {
146137 Serial.println ();
147138
148139 WiFi.disconnect ();
149- // while (WiFi.status() == WL_CONNECTED) {
150- // delay(5);
151- // }
152140
153141 Serial.print (" Attempting to connect to SSID \" " );
154142 Serial.print (ssid);
@@ -173,7 +161,7 @@ void loop() {
173161
174162void testWiFi () {
175163 WiFi.begin (ssid, pass);
176- while (WiFi.status () == WL_DISCONNECTED) {
164+ while (WiFi.status () == WL_DISCONNECTED || WiFi. status () == WL_IDLE_STATUS ) {
177165 Serial.print (' .' );
178166 delay (1000 );
179167 }
You can’t perform that action at this time.
0 commit comments