Go Down

Topic: MFC522 programming error in Arduino uno (Read 267 times) previous topic - next topic

shoeb

I've followed the tutorial
https://randomnerdtutorials.com/security-access-using-mfrc522-rfid-reader-with-arduino/

Getting compilation error. It seem there is issue in the code but I downloaded the the library from github. How could be a wrong code there?
 
Quote
Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Uno"

sketch_apr29a:5: error: 'D8' was not declared in this scope

 #define SS_PIN          D8        // Configurable, see typical pin layout above

                         ^

C:\Users\shoeb\Documents\Arduino\sketch_apr29a\sketch_apr29a.ino:7:17: note: in expansion of macro 'SS_PIN'

 MFRC522 mfrc522(SS_PIN, RST_PIN);  // Create MFRC522 instance

                 ^

sketch_apr29a:4: error: 'D3' was not declared in this scope

 #define RST_PIN         D3         // Configurable, see typical pin layout above

                         ^

C:\Users\shoeb\Documents\Arduino\sketch_apr29a\sketch_apr29a.ino:7:25: note: in expansion of macro 'RST_PIN'

 MFRC522 mfrc522(SS_PIN, RST_PIN);  // Create MFRC522 instance

                         ^

C:\Users\shoeb\Documents\Arduino\sketch_apr29a\sketch_apr29a.ino: In function 'void setup()':

sketch_apr29a:12: error: 'class MFRC522' has no member named 'PCD_Init'

   mfrc522.PCD_Init();   // Init MFRC522

           ^

sketch_apr29a:13: error: 'class MFRC522' has no member named 'PCD_DumpVersionToSerial'

   mfrc522.PCD_DumpVersionToSerial();  // Show details of PCD - MFRC522 Card Reader details

           ^

C:\Users\shoeb\Documents\Arduino\sketch_apr29a\sketch_apr29a.ino: In function 'void loop()':

sketch_apr29a:19: error: 'class MFRC522' has no member named 'PICC_IsNewCardPresent'

   if ( ! mfrc522.PICC_IsNewCardPresent()) {

                  ^

sketch_apr29a:24: error: 'class MFRC522' has no member named 'PICC_ReadCardSerial'

   if ( ! mfrc522.PICC_ReadCardSerial()) {

                  ^

sketch_apr29a:29: error: 'class MFRC522' has no member named 'PICC_DumpToSerial'

   mfrc522.PICC_DumpToSerial(&(mfrc522.uid));

           ^

sketch_apr29a:29: error: 'class MFRC522' has no member named 'uid'

   mfrc522.PICC_DumpToSerial(&(mfrc522.uid));

                                       ^

Multiple libraries were found for "MFRC522.h"
 Used: C:\Program Files (x86)\Arduino\libraries\MFRC522-UART-Arduino-master
 Not used: C:\Users\shoeb\Documents\Arduino\libraries\rfid-master
 Not used: C:\Program Files (x86)\Arduino\libraries\rfid-master
exit status 1
'D8' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Go Up