       Serial.println();
       Serial.println("Could not connect to WIFI");
       ESP.restart();
+      delay(2000);
     }
   }
 

          payload += int(ave.mean());
          payload += ",\"NemoEmptyStddev\":";
          payload += ave.stddev();
          payload += ",\"ScaleFreeHeap\":";
          payload += ESP.getFreeHeap();
          payload += ",\"ScaleRSSI\":";
          payload += WiFi.RSSI();
          payload += ",\"millis\":";
          payload += (millis() - startMills);

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

