From 19ada3f64a65a7e246ae30323385dc9b67d110bc Mon Sep 17 00:00:00 2001 From: UnKnoWn-Consortium Date: Sat, 24 Jan 2015 01:08:05 +0000 Subject: [PATCH 1/2] Update DumpInfo.ino Added pin layouts for ATMEGA32U4-based Arduinos in comment; code unchanged --- examples/DumpInfo/DumpInfo.ino | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/DumpInfo/DumpInfo.ino b/examples/DumpInfo/DumpInfo.ino index ca1e83f..40375a4 100644 --- a/examples/DumpInfo/DumpInfo.ino +++ b/examples/DumpInfo/DumpInfo.ino @@ -26,16 +26,16 @@ * reading distance until complete. * * Typical pin layout used: - * ------------------------------------------------------------ - * MFRC522 Arduino Arduino Arduino - * Reader/PCD Uno Mega Nano v3 - * Signal Pin Pin Pin Pin - * ------------------------------------------------------------ - * RST/Reset RST 9 5 D9 - * SPI SS SDA(SS) 10 53 D10 - * SPI MOSI MOSI 11 / ICSP-4 51 D11 - * SPI MISO MISO 12 / ICSP-1 50 D12 - * SPI SCK SCK 13 / ICSP-3 52 D13 + * ----------------------------------------------------------------------------------------- + * MFRC522 Arduino Arduino Arduino Arduino Arduino + * Reader/PCD Uno Mega Nano v3 Leonardo/Micro Pro Micro + * Signal Pin Pin Pin Pin Pin Pin + * ----------------------------------------------------------------------------------------- + * RST/Reset RST 9 5 D9 RESET/ICSP-5 RST + * SPI SS SDA(SS) 10 53 D10 10 10 + * SPI MOSI MOSI 11 / ICSP-4 51 D11 ICSP-4 16 + * SPI MISO MISO 12 / ICSP-1 50 D12 ICSP-1 14 + * SPI SCK SCK 13 / ICSP-3 52 D13 ICSP-3 15 */ #include @@ -85,4 +85,4 @@ void ShowReaderDetails() { if ((v == 0x00) || (v == 0xFF)) { Serial.println("WARNING: Communication failure, is the MFRC522 properly connected?"); } -} \ No newline at end of file +} From 90729874011efa50d547c184d805bde9e7f5d246 Mon Sep 17 00:00:00 2001 From: UnKnoWn-Consortium Date: Sat, 24 Jan 2015 22:03:45 +0000 Subject: [PATCH 2/2] Update DumpInfo.ino Added pin layouts for ATMEGA32U4-based Arduinos in comment; code updated to account for serial behaviors of ATMEGA32U4-based Arduinos --- examples/DumpInfo/DumpInfo.ino | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/DumpInfo/DumpInfo.ino b/examples/DumpInfo/DumpInfo.ino index 40375a4..94010d3 100644 --- a/examples/DumpInfo/DumpInfo.ino +++ b/examples/DumpInfo/DumpInfo.ino @@ -48,6 +48,7 @@ MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance 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 ShowReaderDetails(); // Show details of PCD - MFRC522 Card Reader details