Update rfid_default_keys.ino

Updated code to account for serial behavior change in ATMEGA32U4
This commit is contained in:
UnKnoWn-Consortium
2015-01-25 00:07:26 +00:00
parent dde29687c2
commit 0627e6e9df

View File

@@ -53,6 +53,7 @@ byte knownKeys[NR_KNOWN_KEYS][MFRC522::MF_KEY_SIZE] = {
*/ */
void setup() { void setup() {
Serial.begin(9600); // Initialize serial communications with the PC Serial.begin(9600); // Initialize serial communications with the PC
while (!Serial); // Do nothing if no serial port is opened (added for Arduinos based on ATMEGA32U4)
SPI.begin(); // Init SPI bus SPI.begin(); // Init SPI bus
mfrc522.PCD_Init(); // Init MFRC522 card mfrc522.PCD_Init(); // Init MFRC522 card
Serial.println("Try the most used default keys to print block 0 of a MIFARE PICC."); Serial.println("Try the most used default keys to print block 0 of a MIFARE PICC.");