   sendHx711toMqtt(payload, topicEvery);
 
   payload = "{\"WeightAvg\":0}";
-  sendHx711toMqtt(payload, topicAverage);  
+  sendHx711toMqtt(payload, topicAverage);
 
 }
 


  if (WiFi.status() == WL_CONNECTED) {
    if (!client.connected()) {
      if  (
        client.connect(MQTT::Connect((char*) clientName.c_str()).set_clean_session().set_keepalive(120))) {
        client.publish(hellotopic, "hello from ESP8266 s06");
      }
    }

    if (client.connected()) {
      client.loop();
    } else {
      ESP.restart();
    }
  } else {
      Serial.println("Could not connect to WIFI");
      ESP.restart();    
  }
  
  if ( blank_checked == LOW ) {
    delay(2000);
    check_blank();

    {
      ave.push(measured);

      if ( ((ave.maximum() - ave.minimum()) < 50 ) && ( ave.stddev() < 20) && ( nofchecked > 10 ) && ( ave.mean() > 1000 ) && ( ave.mean() < 10000 ) && ( AvgMeasuredIsSent == LOW ) )
      {
        payload = "{\"WeightAvg\":";
        payload += ( int(ave.mean()) - measured_empty );
