 
     //requestDisplayTime = true;
 
+    checkDisplayCondition();
+
     checkOpenCondition();
 }
 
+void checkDisplayCondition() {
+    // Only check to turn off the display when the display is currently on
+    if (displayState == 1) {
+        displayTimerCounter++;
+        Serial.println(displayTimerCounter);
+        if (displayTimerCounter > 20) {
+            displayTimerCounter = 0;
+            displayState = 0;
+            lcd.setColorAll();
+            lcd.noDisplay();
+            Serial.println("should turn off display now");
+        }
+    }
+}
+
 void displayTime() {
+    if (!displayState) {
+        return;
+    }
+
     if (!requestDisplayConfigurationTime) {
         if (requestDisplayTime) {
             if (!isLCDBusy) {
+
                 isLCDBusy = true;
                 lcd.setCursor(0,0);
                 lcd.print("          ");

void updateSwitchState() {
    switchState = digitalRead(SWITCHPIN);
    requestDisplayStatus = true;
}

// void updateButtonState() {
//     startOpenOperation("");
// }

int startOpenOperation(String command) {
    requestOpeningOperation = true;

        startBuzzerForConfiguration();

        if (!isLCDBusy) {
            if (!displayState) {
                lcd.display();
                lcd.setColorWhite();
                displayState = 1;
            }
            isLCDBusy = true;
            lcd.setCursor(11,0);
            lcd.print(configurationTime.hour);
