Neues Laptop - Probleme mit der IDE und der Bibliothek mfrc 522

Moinsen,…

Ich musste mir zwangsweise ein neues Laptop anschaffen und habe jetzt das Problem das ich die Bibliothek für den MFRC522 nicht installieren kann, (habe alle versionen ab 1.4.0 aufwärts versucht) habe die IDE neu installieren müssen. Das sketchbook liegt auf einer anderen Partition. Am installationsordner habe ich nichts verändert. Hat jmd ne Idee? Bin echt am verzweifeln, und nur der Code von Tonuino geht nicht, ist einer von 2en.

Fehlermeldung in der IDE:

Arduino: 1.8.13 (Windows 10), Board: "Arduino Uno"

Tonuino:160:1: error: 'MFRC522' does not name a type

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

 ^~~~~~~

Tonuino:161:1: error: 'MFRC522' does not name a type

 MFRC522::MIFARE_Key key;

 ^~~~~~~

Tonuino:166:1: error: 'MFRC522' does not name a type

 MFRC522::StatusCode status;

 ^~~~~~~

F:\sketchbook\S t e f a n\Tonuino\Tonuino.ino: In function 'void setup()':

Tonuino:209:3: error: 'mfrc522' was not declared in this scope

   mfrc522.PCD_Init(); // Init MFRC522

   ^~~~~~~

Tonuino:213:5: error: 'key' was not declared in this scope

     key.keyByte[i] = 0xFF;

     ^~~

F:\sketchbook\S t e f a n\Tonuino\Tonuino.ino: In function 'void loop()':

Tonuino:254:9: error: 'mfrc522' was not declared in this scope

         mfrc522.PICC_HaltA();

         ^~~~~~~

Tonuino:282:13: error: 'mfrc522' was not declared in this scope

   } while (!mfrc522.PICC_IsNewCardPresent());

             ^~~~~~~

F:\sketchbook\S t e f a n\Tonuino\Tonuino.ino: In function 'void resetCard()':

Tonuino:438:13: error: 'mfrc522' was not declared in this scope

   } while (!mfrc522.PICC_IsNewCardPresent());

             ^~~~~~~

F:\sketchbook\S t e f a n\Tonuino\Tonuino.ino: In function 'bool readCard(nfcTagObject*)':

Tonuino:478:19: error: 'mfrc522' was not declared in this scope

   dump_byte_array(mfrc522.uid.uidByte, mfrc522.uid.size);

                   ^~~~~~~

Tonuino:481:3: error: 'MFRC522' has not been declared

   MFRC522::PICC_Type piccType = mfrc522.PICC_GetType(mfrc522.uid.sak);

   ^~~~~~~

Tonuino:482:43: error: 'piccType' was not declared in this scope

   Serial.println(mfrc522.PICC_GetTypeName(piccType));

                                           ^~~~~~~~

F:\sketchbook\S t e f a n\Tonuino\Tonuino.ino:482:43: note: suggested alternative: 'decltype'

   Serial.println(mfrc522.PICC_GetTypeName(piccType));

                                           ^~~~~~~~

                                           decltype

Tonuino:489:3: error: 'status' was not declared in this scope

   status = (MFRC522::StatusCode)mfrc522.PCD_Authenticate(

   ^~~~~~

F:\sketchbook\S t e f a n\Tonuino\Tonuino.ino:489:3: note: suggested alternative: 'static'

   status = (MFRC522::StatusCode)mfrc522.PCD_Authenticate(

   ^~~~~~

   static

Tonuino:489:13: error: 'MFRC522' has not been declared

   status = (MFRC522::StatusCode)mfrc522.PCD_Authenticate(

             ^~~~~~~

Tonuino:491:17: error: 'MFRC522' has not been declared

   if (status != MFRC522::STATUS_OK) {

                 ^~~~~~~

Tonuino:500:65: error: 'key' was not declared in this scope

   mfrc522.PICC_DumpMifareClassicSectorToSerial(&(mfrc522.uid), &key, sector);

                                                                 ^~~

Tonuino:507:13: error: 'MFRC522' has not been declared

   status = (MFRC522::StatusCode)mfrc522.MIFARE_Read(blockAddr, buffer, &size);

             ^~~~~~~

Tonuino:508:17: error: 'MFRC522' has not been declared

   if (status != MFRC522::STATUS_OK) {

                 ^~~~~~~

F:\sketchbook\S t e f a n\Tonuino\Tonuino.ino: In function 'void writeCard(nfcTagObject)':

Tonuino:536:3: error: 'MFRC522' has not been declared

   MFRC522::PICC_Type mifareType;

   ^~~~~~~

Tonuino:547:3: error: 'mifareType' was not declared in this scope

   mifareType = mfrc522.PICC_GetType(mfrc522.uid.sak);

   ^~~~~~~~~~

Tonuino:547:16: error: 'mfrc522' was not declared in this scope

   mifareType = mfrc522.PICC_GetType(mfrc522.uid.sak);

                ^~~~~~~

Tonuino:551:3: error: 'status' was not declared in this scope

   status = (MFRC522::StatusCode)mfrc522.PCD_Authenticate(

   ^~~~~~

F:\sketchbook\S t e f a n\Tonuino\Tonuino.ino:551:3: note: suggested alternative: 'static'

   status = (MFRC522::StatusCode)mfrc522.PCD_Authenticate(

   ^~~~~~

   static

Tonuino:551:13: error: 'MFRC522' has not been declared

   status = (MFRC522::StatusCode)mfrc522.PCD_Authenticate(

             ^~~~~~~

Tonuino:553:17: error: 'MFRC522' has not been declared

   if (status != MFRC522::STATUS_OK) {

                 ^~~~~~~

Tonuino:566:13: error: 'MFRC522' has not been declared

   status = (MFRC522::StatusCode)mfrc522.MIFARE_Write(blockAddr, buffer, 16);

             ^~~~~~~

Tonuino:567:17: error: 'MFRC522' has not been declared

   if (status != MFRC522::STATUS_OK) {

                 ^~~~~~~

In file included from F:\sketchbook\S t e f a n\Tonuino\Tonuino.ino:1:0:

F:\sketchbook\libraries\DFPlayer_Mini_Mp3_by_Makuna\src/DFMiniMp3.h: In instantiation of 'uint16_t DFMiniMp3<T_SERIAL_METHOD, T_NOTIFICATION_METHOD>::listenForReply(uint8_t) [with T_SERIAL_METHOD = SoftwareSerial; T_NOTIFICATION_METHOD = Mp3Notify; uint16_t = unsigned int; uint8_t = unsigned char]':

F:\sketchbook\libraries\DFPlayer_Mini_Mp3_by_Makuna\src/DFMiniMp3.h:105:27:   required from 'void DFMiniMp3<T_SERIAL_METHOD, T_NOTIFICATION_METHOD>::loop() [with T_SERIAL_METHOD = SoftwareSerial; T_NOTIFICATION_METHOD = Mp3Notify]'

F:\sketchbook\S t e f a n\Tonuino\Tonuino.ino:230:14:   required from here

F:\sketchbook\libraries\DFPlayer_Mini_Mp3_by_Makuna\src/DFMiniMp3.h:511:62: error: no matching function for call to 'Mp3Notify::OnPlayFinished(DfMp3_PlaySources, uint16_t&)'

                         T_NOTIFICATION_METHOD::OnPlayFinished(DfMp3_PlaySources_Usb, replyArg);

                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

F:\sketchbook\S t e f a n\Tonuino\Tonuino.ino:40:15: note: candidate: static void Mp3Notify::OnPlayFinished(uint16_t)

   static void OnPlayFinished(uint16_t track) {

               ^~~~~~~~~~~~~~

F:\sketchbook\S t e f a n\Tonuino\Tonuino.ino:40:15: note:   candidate expects 1 argument, 2 provided

In file included from F:\sketchbook\S t e f a n\Tonuino\Tonuino.ino:1:0:

F:\sketchbook\libraries\DFPlayer_Mini_Mp3_by_Makuna\src/DFMiniMp3.h:515:62: error: no matching function for call to 'Mp3Notify::OnPlayFinished(DfMp3_PlaySources, uint16_t&)'

                         T_NOTIFICATION_METHOD::OnPlayFinished(DfMp3_PlaySources_Sd, replyArg);

                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

F:\sketchbook\S t e f a n\Tonuino\Tonuino.ino:40:15: note: candidate: static void Mp3Notify::OnPlayFinished(uint16_t)

   static void OnPlayFinished(uint16_t track) {

               ^~~~~~~~~~~~~~

F:\sketchbook\S t e f a n\Tonuino\Tonuino.ino:40:15: note:   candidate expects 1 argument, 2 provided

In file included from F:\sketchbook\S t e f a n\Tonuino\Tonuino.ino:1:0:

F:\sketchbook\libraries\DFPlayer_Mini_Mp3_by_Makuna\src/DFMiniMp3.h:519:62: error: no matching function for call to 'Mp3Notify::OnPlayFinished(DfMp3_PlaySources, uint16_t&)'

                         T_NOTIFICATION_METHOD::OnPlayFinished(DfMp3_PlaySources_Flash, replyArg);

                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

F:\sketchbook\S t e f a n\Tonuino\Tonuino.ino:40:15: note: candidate: static void Mp3Notify::OnPlayFinished(uint16_t)

   static void OnPlayFinished(uint16_t track) {

               ^~~~~~~~~~~~~~

F:\sketchbook\S t e f a n\Tonuino\Tonuino.ino:40:15: note:   candidate expects 1 argument, 2 provided

In file included from F:\sketchbook\S t e f a n\Tonuino\Tonuino.ino:1:0:

F:\sketchbook\libraries\DFPlayer_Mini_Mp3_by_Makuna\src/DFMiniMp3.h:524:66: error: 'OnPlaySourceOnline' is not a member of 'Mp3Notify'

                         T_NOTIFICATION_METHOD::OnPlaySourceOnline(static_cast<DfMp3_PlaySources>(replyArg));

                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

F:\sketchbook\libraries\DFPlayer_Mini_Mp3_by_Makuna\src/DFMiniMp3.h:529:68: error: 'OnPlaySourceInserted' is not a member of 'Mp3Notify'

                         T_NOTIFICATION_METHOD::OnPlaySourceInserted(static_cast<DfMp3_PlaySources>(replyArg));

                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

F:\sketchbook\libraries\DFPlayer_Mini_Mp3_by_Makuna\src/DFMiniMp3.h:534:67: error: 'OnPlaySourceRemoved' is not a member of 'Mp3Notify'

                         T_NOTIFICATION_METHOD::OnPlaySourceRemoved(static_cast<DfMp3_PlaySources>(replyArg));

                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

exit status 1

'MFRC522' does not name a type



Dieser Bericht wäre detaillierter, wenn die Option
"Ausführliche Ausgabe während der Kompilierung"
in Datei -> Voreinstellungen aktiviert wäre.

Nachtrag: ein anderer Code mit dem selben reader (einfacher RFID code als Türöffner) funzt problemlos

Hast du mal den Arduino Nano anstelle des Board: "Arduino Uno" benutzt?

Wnn du die Library über Bibliothek verwalten installierst legt er die Library bei mir im Installationsverzeichniss im Unterordner librarys ab. Da könnte es zu Konflikten mit Libs im Sketchordner librarys geben.

hab 3 verschiedene Nanos probiert… Hat ja funktioniert mit mein alten schlepptop…
nur eben mit dem neuen nicht

ok,… hab n neuen Code genommen funzt jetzt…