   Serial.println("Going sleep");
 
   scale.power_down();
-
-  //
-  MeasuredIsSent = LOW;
-  Attempt = 0;
-
-  //
+ 
   //digitalWrite(espnemoIsOnPadPin, LOW);
   digitalWrite(ledPowerPin, LOW);
 

              Serial.print("============> nemo is not on pad now");
            }
            Attempt++;
      }

      if ( Attempt == 10 )
      {
            Serial.println("======> Measurement has problem");
            sleepNow();
      }

      if (( average > 1000 ) && ( Measured < (average - 1000)) )
      {
            VccValue = vcc.Read_Volts() * 1000 ;
            Serial.println("");
            Serial.print("==========> average ");
            Serial.print(average) ;
            Serial.print("   =====> VCC ");
            Serial.println(VccValue);
            espReset();
            IsEspReseted = HIGH;
            Attempt = 0;
      }
      delay(500);
  }

  if ( IsEspReseted == HIGH ) {
      Attempt++;
      if ( Attempt == 20 ) 
      {
          Serial.println("======> I2C has problem");
          sleepNow();
      }
      delay(1000);
  }


  if ( mqttMsgSent == HIGH )
  {
    Serial.println("======> mqtt msg has sent");
    digitalWrite(ledPowerPin, LOW);
    delay(300);
    digitalWrite(ledPowerPin, HIGH);    
    sleepNow();
  }

}

      Serial.print(Measured);
      Serial.print("   ==> ");

      if (( Measured >= 500 ) && ( Measured > (average - 500)))
      {
            total = total - readings[indexof];
            readings[indexof] = Measured;
