   warehouseServo.write(WarehouseServoOpen);
   delay(servoPositionDelay); //waits servo to reach position
   warehouseServo.detach(); //detaches the warehouseServo
+}
+
+void callCloseDoor(){
+  //used as ISR can't have delay()
+  //and delay is needed to wait for servo
+  //to get to its position
+  //so a variable is used instead
+  //to call closeDoor() from main loop
+  closeDrawer = true;
+  
 }
 
 void closeDoor(){

  Serial.begin(9600);
  
  //define drawer limit switch pin as interrupt pin to secure drawer automatically
  attachInterrupt(digitalPinToInterrupt(doorSwitch), closeDoor, RISING);
  
  pinMode(  trayLimit,  INPUT);
  pinMode(  upLimit,    INPUT);

#define    trayLimit    A5
#define    upLimit      A4

#define    releaseBillDelay 5000 //to wait untill bill released
#define    getBillDelay     1000 //to wait until bill catched for sure
#define    upStepperDelay   3    //to wait before up/down steps
#define    roStepperDelay   15   //to wait before rotation steps
