     SerialUSB.print("to station + soft AP ok\r\n");
   } else {
     SerialUSB.print("to station + soft ap error\r\n");
+    errcnt++;
   }
 
   if (wifi.joinAP(WIFI_SSID, WIFI_PASSWORD)) {
     SerialUSB.print("Join AP success\r\n");
     SerialUSB.print("IP: ");
-    SerialUSB.println(getIP(true)); // short version of output, cached
+    SerialUSB.println(getIP(true)); // short version of IP, cached
+    SerialUSB.print("MAC: ");
+    SerialUSB.println(gethostname(true)); // short version of hostname, cached
   } else {
     SerialUSB.println("Join AP error");
+    errcnt++;
   }  
 
   if (wifi.disableMUX()) {
     SerialUSB.println("MUX disabled");
   } else {
     SerialUSB.println("MUX disabling failed");
+    errcnt++;
   }
-  
 }
 
-int counter = 0; 
-
 void loop() {
+  static int counter = 0; 
+  
   counter++;
-  SerialUSB.println("--"); 
-  SerialUSB.println(counter);
-  SerialUSB.print("IP: ");
-  SerialUSB.println(getIP(true)); // short version of output, cached
-  lg_heartbeat();
+  if ((counter % 5) == 0) lg_heartbeat(); // every 5 loops
   
-  delay(5000); 
+  delay(60000); // one loop per minute 
 }
 
 /* get local IP address. The wifi library gives a strig result like this: 


#include <wino.h>
#include "config.h" 

void setup() {
  SerialUSB.begin(9600); //Opens USB-Serial connection for terminal

    SerialUSB.println("tcp connection failed");
  }

  String payload = "{ \"host\": \"" + gethostname(true) + "\", \"loopcount\": " + loopcnt + ", \"errcount\": " + errcnt + " }"; 
  String request = "POST /api/collections/heartbeat?user_key=" + String(LG_API_KEY) + " HTTP/1.1\r\n"
    + "Host: " + LG_HOST + "\r\n"
    + "User-Agent: arduino-wino/1.0 \r\n"
