From af323a12abe02f6ad7095cca18536fc6d1791219 Mon Sep 17 00:00:00 2001 From: UnKnoWn-Consortium Date: Sun, 25 Jan 2015 00:09:20 +0000 Subject: [PATCH] Update ReadAndWrite.ino Updated code to account for serial behavior change in ATMEGA32U4 --- examples/ReadAndWrite/ReadAndWrite.ino | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/ReadAndWrite/ReadAndWrite.ino b/examples/ReadAndWrite/ReadAndWrite.ino index 690771b..6d7b6b6 100644 --- a/examples/ReadAndWrite/ReadAndWrite.ino +++ b/examples/ReadAndWrite/ReadAndWrite.ino @@ -42,6 +42,7 @@ MFRC522::MIFARE_Key key; */ 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