        payload += x;
        payload += "}";
 
-      sendHx711(payload);
-    }
-
-}
-
-
-void sendHx711(String payload) {
+      sendHx711topicAverage(payload);
+    }
+
+}
+
+
+void sendHx711topicEvery(String payload) {
   if (!client.connected()) {
     if (client.connect((char*) clientName.c_str())) {
       Serial.println("Connected to MQTT broker again HX711");
       Serial.print("Topic is: ");
-      Serial.println(topic);
+      Serial.println(topicEvery);
     }
     else {
       Serial.println("MQTT connect failed");


#define nemoisOnPin 14

char* topic = "esp8266/arduino/s06";
char* hellotopic = "HELLO";

String clientName;

  if (client.connect((char*) clientName.c_str())) {
    Serial.println("Connected to MQTT broker");
    Serial.print("Topic is: ");
    Serial.println(topicEvery);

    if (client.publish(hellotopic, "hello from ESP8266 s06")) {
      Serial.println("Publish ok");
