 }
 
 void setup() {
+  lcd.begin(16, 2);
+  lcd.print("Booting....");
+  
   Serial.begin(9600);		// Initialize serial communications with the PC
+  
   SPI.begin();			// Init SPI bus
   mfrc522.PCD_Init();		// Init MFRC522
+  
   updateDisplay();
 }
 

      buffer = "";
    }
  } else if (state == INVALID_PIN) {
    if (timeoutExpired()) {
      setState(LOCKED);
    }
  } else {

    Serial.println(" |");
    Serial.println("|                    |");
    Serial.println("+--------------------+");
    */
    lcd.print("Please enter PIN");
    lcd.setCursor(0, 1);
    for (int i = 0; i < buffer.length(); i++) {
      lcd.print("*");
    }
  } else if (state == WAIT_FOR_UNLOCK) {
    /*Serial.println("+--------------------+");
    Serial.println("|                    |");
    Serial.println("| Waiting for        |");
    Serial.println("|       unlocking    |");
    Serial.println("|                    |");
    Serial.println("+--------------------+");*/
    lcd.print("Waiting for     ");
    lcd.setCursor(0, 1);
    lcd.print("   confirmation ");
  } else if (state == INVALID_PIN) {
    /*
    Serial.println("+--------------------+");
    Serial.println("|                    |");
    Serial.println("| Invalid PIN        |");
    Serial.println("|   Pleas try again. |");
    Serial.println("|                    |");
    Serial.println("+--------------------+");
    */
    lcd.print("Invalid PIN     ");
    lcd.setCursor(0, 1);
    lcd.print("Please try again");
  } else if (state == UNLOCKED) {
    /*
    Serial.println("+--------------------+");
    Serial.println("|     Welcome!       |");
    Serial.println("| The space is open. |");
    Serial.println("|                    |");
    Serial.println("| Press 0# to lock.  |");
    Serial.println("+--------------------+");
    */
    lcd.print("Space is open   ");
    lcd.setCursor(0, 1);
    lcd.print("Press 0# to lock");
  }
}

