 volatile bool requestDisplayTime = false;
 volatile bool requestDisplayConfigurationTime = true;
 volatile bool requestOpeningOperation = false;
+volatile bool isLCDBusy = false;
 
 Timer clockTimer(1000, updateTime); // timer used to display the clock on the lcd display
 


void loop() {
    if (requestOpeningOperation) {
        lcd.setCursor(0,1);
        lcd.print("               ");
        lcd.setCursor(0,1);
        lcd.print("will open....");

        digitalWrite(LEDPIN, HIGH);
        openOperation.start();



void displayStatus() {
    if (requestDisplayStatus) {
        if (!isLCDBusy) {
            isLCDBusy = true;
            if (switchState == HIGH) {
                lcd.setCursor(0,1);
                lcd.print("               ");
                lcd.setCursor(0,1);
                lcd.print("LOCKED");
            } else {
                lcd.setCursor(0,1);
                lcd.print("               ");
                lcd.setCursor(0,1);
                lcd.print("OPEN");
            }
            isLCDBusy = false;
            requestDisplayStatus = false;
        }
    }
}

