|
|
|
@ -1,3 +1,5 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Standard ESP8266 libs
|
|
|
|
|
#include <ESP8266mDNS.h> |
|
|
|
|
#include <ESP8266HTTPUpdateServer.h> |
|
|
|
@ -68,11 +70,6 @@ String localIP = "127.0.0.1"; |
|
|
|
|
|
|
|
|
|
void setup() { |
|
|
|
|
|
|
|
|
|
#ifdef BOARD_NODEMCU |
|
|
|
|
// on nodemcu v0.1 (aliexpress) the delay is required to prevent a endless reboot bug
|
|
|
|
|
delay(100); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
// Erase WiFi Credentials (maybe this will work ...)
|
|
|
|
|
//WiFi.disconnect(true);
|
|
|
|
|
//delay(2000);
|
|
|
|
@ -151,6 +148,9 @@ void setup() { |
|
|
|
|
WiFi.mode(WIFI_OFF); |
|
|
|
|
WiFi.forceSleepBegin(); |
|
|
|
|
|
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.println("deep sleep"); |
|
|
|
|
#endif |
|
|
|
|
// the ESP.deepSleep requires microseconds as input, after the sleep the system will run into the setup routine
|
|
|
|
|
ESP.deepSleep(POWERSAVING_SLEEP_S * 1000000, WAKE_RF_DEFAULT); |
|
|
|
|
delay(100); |
|
|
|
|