 {
   for (int i = 0; i < 15; i++) {
     int blank_measured = requestHX711();
-    if ( blank_measured > 500 ) { return ; }
+    if ( blank_measured > 500 ) {
+      return ;
+    }
     digitalWrite(ledPin, HIGH);
     ave.push(blank_measured);
     delay(500);


void loop() {
  if ( blank_checked == LOW ) {
        delay(5000);
        check_blank();
  }

  inuse = digitalRead(nemoisOnPin);
  measured = requestHX711();
  if ( inuse == HIGH ) {
    digitalWrite(ledPin, HIGH);
    if ( measured > 20 )

      {
        payload = "{\"WeightAvg\":";
        payload += int(ave.mean());
        payload += ",\"WeightAvgStddev\":";
        payload += ave.stddev();
        payload += "}";

        sendHx711toMqtt(payload, topicAverage);
      } else {
        if ( nofchecked > 3 ) {
          payload = "{\"NemoWeight\":";
          payload += measured;
          payload += "}";

          sendHx711toMqtt(payload, topicEvery);
        }
      }
    }
  } else {
    digitalWrite(ledPin, LOW);
    if ( AvgMeasuredIsSent == HIGH ) {
      check_poop();
      AvgMeasuredIsSent = LOW;
    }

    ave.push(measured);

    if ( ( ave.stddev() < 50) && ( nofnotinuse > 15 ) ) {
      payload = "{\"NemoEmpty\":";
      payload += int(ave.mean());
      payload += ",\"NemoEmptyStddev\":";
      payload += ave.stddev();
      payload += "}";

      sendHx711toMqtt(payload, topicEvery);

      measured    = 0;
      nofnotinuse = 0;
    }
    nofchecked = 0;
  }

  nofchecked++;
  nofnotinuse++;
  delay(1000);

}
