 
     display.begin();
     dht22.begin();
-
-#ifdef ESP8266
-    WiFi.mode(WIFI_STA);
-    WiFi.disconnect();
-    delay(100);
-    WiFi.forceSleepBegin(); // Use WiFi.forceSleepWake() to enable wifi
-
-    String r = ESP.getResetReason();
-
-    if (r == "Deep-Sleep Wake") {
-        clear = false;
-    }
-#endif
 
     if (clear) {
         display.clear();


#ifdef ESP8266
    expand.begin();
#else
    mySerial.begin(9600);
#endif

    }

#ifdef ESP8266
    WiFi.mode(WIFI_STA);

    delay(1000);
    set_press = (expand.readByte() & 0b10 ) != 0b10;
