 // ir
 IRrecv irrecv(IR_RX_PIN);
 lgWhisen lgWhisen;
+
+unsigned long lastPing = 0;
+long lastReconnectAttempt = 0;
+time_t prevDisplay = 0;
+
+void tick()
+{
+  //toggle state
+  int state = digitalRead(BUILTIN_LED);  // get the current state of GPIO1 pin
+  digitalWrite(BUILTIN_LED, !state);     // set pin to the opposite state
+}
 
 boolean reconnect() {
   if (!mqttclient.connected())


  // wifi connect
  wifi_connect();

  clientName = "esp8266-";
  uint8_t mac[6];

  Serial.print(ave.mean());
  Serial.print(" ave.stddev(): ");
  Serial.println(ave.stddev());
}

void printDigits(int digits)
