       cycleLeds();              // Program Mode cycles through Red Green Blue waiting to read a new card
     }
     else {
-      normalModeOn(); 		// Normal mode, blue Power LED is on, all others are off
-    }
-  }
-  while (!successRead); 	//the program will not go further while you are not getting a successful read
+      normalModeOn();     // Normal mode, blue Power LED is on, all others are off
+    }
+  }
+  while (!successRead);   //the program will not go further while you are not getting a successful read
   if (programMode) {
     if ( isMaster(readCard) ) { //When in program mode check First If master card scanned again to exit program mode
       Serial.println(F("Master Card Scanned"));


#include <EEPROM.h>     // We are going to read and write PICC's UIDs from/to EEPROM
#include <SPI.h>        // RC522 Module uses SPI protocol
#include <MFRC522.h>	// Library for Mifare RC522 Devices

/*
	Instead of a Relay you may want to use a servo. Servos can lock and unlock door locks too
	Relay will be used by default
*/

// #include <Servo.h> 

/*
	For visualizing whats going on hardware	we need some leds and to control door lock a relay and a wipe button
	(or some other hardware) Used common anode led,digitalWriting HIGH turns OFF led Mind that if you are going 
	to use common cathode led or just seperate leds, simply comment out #define COMMON_ANODE,
*/

#define COMMON_ANODE

      Serial.println(F("-----------------------------"));
    }
    else {
      if ( findID(readCard) ) { // If not, see if the card is in the EEPROM
        Serial.println(F("Welcome, You shall pass"));
        granted(300);         // Open the door lock for 300 ms
      }
      else {      // If not, show that the ID was not valid
        Serial.println(F("You shall not pass"));
        denied();
      }
