         sendEmail(subject, message);
         disconnectInternet();
         rtcStore[1] = STATE_SLEEP_WAKE;
+        if (rtcStore[2] >= 84) {
+          rtcStore[2] = 255;
+        }
         system_rtc_mem_write(RTC_BASE, rtcStore, 3);
       }
       break;

    Serial.println(rtcStore[2]);

  }
  
  startTime = system_get_time();
  return nextSleep;
}

      }
      break;
    case STATE_SLEEP_WAKE:
      if (rtcStore[2] < 48) {
        doWork();
      } else {
        if (connectToInternet()) {
