         Serial.println(client.state());
       }
       long now = millis();
-      if (now - lastReconnectAttempt > 5000) {
+      if (now - lastReconnectAttempt > 1000) {
         lastReconnectAttempt = now;
         if (reconnect()) {
           lastReconnectAttempt = 0;


RtcDS3231 Rtc;

#define DEBUG_PRINT 0

char* topic = "esp8266/arduino/s03";
char* subtopic = "#";

  delay(50);

  if (DEBUG_PRINT) {
    Serial.begin(115200);
    //Serial.begin(74880);
    //Serial.setDebugOutput(true);
  }

  startMills = millis();
