arduino-sketches – Diff between revs 6 and 14
?pathlinks?
Rev 6 | Rev 14 | |||
---|---|---|---|---|
Line 213... | Line 213... | |||
213 | WiFi.hostname(HOSTNAME().c_str()); |
213 | WiFi.hostname(HOSTNAME().c_str()); |
|
214 | #elif defined(ARDUINO_ARCH_ESP32) |
214 | #elif defined(ARDUINO_ARCH_ESP32) |
|
215 | WiFi.setHostname(HOSTNAME().c_str()); |
215 | WiFi.setHostname(HOSTNAME().c_str()); |
|
216 | #endif |
216 | #endif |
|
217 | WiFi.begin(sta_ssid, sta_psk); |
217 | WiFi.begin(sta_ssid, sta_psk); |
|
- | 218 | uint8_t result = WiFi.waitForConnectResult(); |
||
218 | while (WiFi.waitForConnectResult() != WL_CONNECTED) { |
219 | while (result != WL_CONNECTED) { |
|
219 | Serial.println("Failed to connect to Wifi, rebooting in 5s..."); |
220 | Serial.print("Failed to connect to Wifi: "); |
|
- | 221 | Serial.println(result); |
||
- | 222 | Serial.println("Rebooting in 5s..."); |
||
220 | delay(5000); |
223 | delay(5000); |
|
221 | ESP.restart(); |
224 | ESP.restart(); |
|
222 | } |
225 | } |
|
Line 223... | Line 226... | |||
223 | |
226 | |