   digitalWrite(espResetPin, LOW);
   delay(10);
   digitalWrite(espResetPin, HIGH);
+
+  digitalWrite(ledPowerPin, LOW);
+  delay(100);
+  digitalWrite(ledPowerPin, HIGH);
+  delay(100);
+  digitalWrite(ledPowerPin, LOW);
+  delay(100);
+  digitalWrite(ledPowerPin, HIGH);
+
 }
 
 void requestEvent()

void loop()
{

  //Serial.print("=====> checking weight :  ");
  //Serial.println(millis() - startMills);
  if ( IsEspReseted == LOW ) {
      Measured = int( scale.get_units(5) * 1000 );
      Serial.println("");
      Serial.print("==> weight : ");
      Serial.print(Measured);
      Serial.print(" ==> ");
  }

  if (( Measured > 500 ) && ( Measured > (average - 200)) && ( IsEspReseted == LOW ) )
  {
    // Serial.println("======> nemo is on pad now");

    total = total - readings[indexof];
    readings[indexof] = Measured;
    total = total + readings[indexof];
    indexof = indexof + 1;

    if (indexof >= numReadings)
      indexof = 0;

    average = total / numReadings;

    Serial.print("  average ==>  ");
    Serial.println(average);

  }  

  if ( ( Measured <= 500 ) && ( IsEspReseted == LOW ) ) {
    if ( Attempt == 1) {
      Serial.println("");
      Serial.print("============> nemo is not on pad now");
    }
    Serial.println("");
    Attempt++;
  }

  if ( IsEspReseted == HIGH ) {
    Attempt++;
  }

  if (( average > 1000 ) && ( Measured < (average - 500)) && ( IsEspReseted == LOW ))
  {
    VccValue = vcc.Read_Volts() * 1000 ;
    Serial.println("");
    Serial.print("==========> VCC ");
    Serial.println(VccValue);
    //digitalWrite(espnemoIsOnPadPin, HIGH);
    espReset();
    digitalWrite(ledPowerPin, LOW);
    delay(200);
    digitalWrite(ledPowerPin, HIGH);
    delay(200);
    digitalWrite(ledPowerPin, LOW);
    delay(200);
    digitalWrite(ledPowerPin, HIGH);
    IsEspReseted = HIGH;
    Attempt = 0;
    //delay(5000);
  }

  if (( Attempt == 20 ) && ( IsEspReseted == LOW ) )
  {
    Serial.println("======> Measurement has problem");
    sleepNow();
  }

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

  if ( mqttMsgSent == HIGH )
  {

    sleepNow();
  }

}

void espReset()
