   Serial.println("IP address: ");
   Serial.println(WiFi.localIP());
 
-  startMills = millis();
+  //startMills = millis();
 
   if (WiFi.status() == WL_CONNECTED) {
     if (!client.connected()) {
       if (client.connect((char*) clientName.c_str())) {
         client.publish(hellotopic, "hello again wifi and mqtt from ESP8266 s06");
-        Serial.print("reconnecting wifi and mqtt");
+        Serial.println("reconnecting wifi and mqtt");
       } else {
-        Serial.print("mqtt publish fail after wifi reconnect");
+        Serial.println("mqtt publish fail after wifi reconnect");
       }
     } else {
       client.publish(hellotopic, "hello again wifi from ESP8266 s06");

#include <pgmspace.h>
#include <Wire.h>

// wifi
#ifdef __IS_MY_HOME
#include "/usr/local/src/ap_setting.h"
#else
#include "ap_setting.h"

    Serial.print("failed, rc=");
    Serial.print(client.state());
  }
  //startMills = millis();
  return client.connected();
}

