From 0627e6e9df5fc1648ba98a123b568ae6e9d94112 Mon Sep 17 00:00:00 2001 From: UnKnoWn-Consortium Date: Sun, 25 Jan 2015 00:07:26 +0000 Subject: [PATCH] Update rfid_default_keys.ino Updated code to account for serial behavior change in ATMEGA32U4 --- examples/rfid_default_keys/rfid_default_keys.ino | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/rfid_default_keys/rfid_default_keys.ino b/examples/rfid_default_keys/rfid_default_keys.ino index ea4fe08..16693ef 100644 --- a/examples/rfid_default_keys/rfid_default_keys.ino +++ b/examples/rfid_default_keys/rfid_default_keys.ino @@ -53,6 +53,7 @@ byte knownKeys[NR_KNOWN_KEYS][MFRC522::MF_KEY_SIZE] = { */ void setup() { 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 mfrc522.PCD_Init(); // Init MFRC522 card Serial.println("Try the most used default keys to print block 0 of a MIFARE PICC.");