We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d8144fb commit d9b871dCopy full SHA for d9b871d
thermometer/thermometer.ino
@@ -42,11 +42,19 @@ WiFiServer server(80);
42
void setup() {
43
write_header("setup()");
44
Serial.begin(115200);
45
+ WiFi.hostname("ESP8266-Weatherstation");
46
EEPROM.begin(city_len + countrycode_len + apikey_len);
47
setup_display(update_display_clock);
48
WiFiManager wifiManager;
- WiFi.hostname("ESP8266-Weatherstation");
49
- wifiManager.autoConnect("AutoConnectAP");
+ wifiManager.setTimeout(60);
50
+
51
+ if(!wifiManager.autoConnect("AutoConnectAP", "diesistdaspasswort")) {
52
+ Serial.println("failed to connect and hit timeout");
53
+ delay(3000);
54
+ //reset and try again, or maybe put it to deep sleep
55
+ ESP.restart();
56
+ }
57
58
Serial.println("Connected.");
59
ipaddress = WiFi.localIP().toString();
60
read_config_from_storage();
0 commit comments