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