 float tempFloat       = 0;    //for saving sensor data temporary
 int billCount         = 0;    //for storing bill count added by ISR
 int selectedWarehouse = 0;    //to know what warehouse is above the door "0 is the empty one"
-
+bool closeDrawer = false;     //to close door from main loop
 /// using half step mode
 int seq[8][4]={ {1,0,0,0},
                 {1,1,0,0},

  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);

    else if(serialData == 'b')
      initialization();
  }
  if(closeDrawer){
    closeDoor();
    closeDrawer = false;
  }
}

//initialize motors "moves them to initial position"
