     if(ownerSmoothedVal > postmanSmoothedVal) {                                                  // owner opens letterbox
         Serial.println("\t => Owner opened letterbox");
         ownerOpened = true;
-        deliveries = 0;                                         // owner has checked letterbox
     } else {                                                                                     // postman opens letterbox
         Serial.println("\t => Postman opened letterbox");
         postmanOpened = true;

         }
      }
      if(ownerOpened){                                        // owner just closed

        ownerOpened = false;
        previousMail = proximitySmoothedVal;
        Serial.println("\t => mails cleared"); 
      }
    } else {

      if(postmanOpened) {                                       // postman just closed 
         if(proximitySmoothedVal > 10 + previousMail) {
            Serial.println("\t => NEW MAIL DELIVERED !!!");
            deliveries++; // send notification to owner's device -  mails delivered
            postmanOpened = false;
            previousMail = proximitySmoothedVal;
         } else {
