第一篇:RFID的使用与说明-Arduino中文社区 - Powered by Discuz! Archiver

3030257ybs 发表于 2022-2-24 19:46

第一篇:RFID的使用与说明

新手教程:适用于arduino UNO
感谢支持

3030257ybs 发表于 2022-2-25 14:18

感谢支持
持续更新中
楼主24小时内可快速回复

3030257ybs 发表于 2022-2-28 14:50

欢迎提意见

3030257ybs 发表于 2022-3-11 14:31

一个人也没有吗:(:(:(
大家都不喜欢我了吗

knijht 发表于 2022-4-10 20:29

我喜欢你

3030257ybs 发表于 2022-5-7 21:10

knijht 发表于 2022-4-10 20:29
我喜欢你

感谢支持

liyunfei54 发表于 2022-8-6 22:27

下载来学学习学习 最近在接触rfid

Rakin 发表于 2022-8-24 19:55

大佬,报错了

Rakin 发表于 2022-8-24 19:56

Arduino:1.7.8 (Windows 8.1), 板:"Arduino Uno"

In file included from MFRC522.h:78:0,

               from MFRC522.cpp:8:

require_cpp11.h:9:2: error: #error "This library needs at least a C++11 compliant compiler, maybe compiler argument for C++11 support is missing or if you use Arduino IDE upgrade to version >=1.6.6"

#error "This library needs at least a C++11 compliant compiler, maybe compiler argument for C++11 support is missing or if you use Arduino IDE upgrade to version >=1.6.6"

^

In file included from MFRC522.cpp:8:0:

MFRC522.h:146:9: error: 'constexpr' does not name a type

static constexpr byte FIFO_SIZE = 64;// The FIFO is 64 bytes.

         ^

MFRC522.h:146:9: note: C++11 'constexpr' only available with -std=c++11 or -std=gnu++11

MFRC522.h:148:9: error: 'constexpr' does not name a type

static constexpr uint8_t UNUSED_PIN = UINT8_MAX;

         ^

MFRC522.h:148:9: note: C++11 'constexpr' only available with -std=c++11 or -std=gnu++11

In file included from MFRC522.cpp:8:0:

MFRC522.h:376:111: error: 'nullptr' was not declared in this scope

StatusCode PCD_TransceiveData(byte *sendData, byte sendLen, byte *backData, byte *backLen, byte *validBits = nullptr, byte rxAlign = 0, bool checkCRC = false);

                                                                                                               ^

MFRC522.h:377:112: error: 'nullptr' was not declared in this scope

StatusCode PCD_CommunicateWithPICC(byte command, byte waitIRq, byte *sendData, byte sendLen, byte *backData = nullptr, byte *backLen = nullptr, byte *validBits = nullptr, byte rxAlign = 0, bool checkCRC = false);

                                                                                                                ^

MFRC522.h:377:137: error: 'nullptr' was not declared in this scope

StatusCode PCD_CommunicateWithPICC(byte command, byte waitIRq, byte *sendData, byte sendLen, byte *backData = nullptr, byte *backLen = nullptr, byte *validBits = nullptr, byte rxAlign = 0, bool checkCRC = false);

                                                                                                                                       ^

MFRC522.h:377:164: error: 'nullptr' was not declared in this scope

StatusCode PCD_CommunicateWithPICC(byte command, byte waitIRq, byte *sendData, byte sendLen, byte *backData = nullptr, byte *backLen = nullptr, byte *validBits = nullptr, byte rxAlign = 0, bool checkCRC = false);

                                                                                                                                                                  ^

MFRC522.cpp: In constructor 'MFRC522::MFRC522()':

MFRC522.cpp:16:33: error: 'UINT8_MAX' was not declared in this scope

MFRC522::MFRC522(): MFRC522(SS, UINT8_MAX) { // SS is defined in pins_arduino.h, UINT8_MAX means there is no connection from Arduino to MFRC522's reset and power down input

                                 ^

MFRC522.cpp: In member function 'void MFRC522::PCD_Init()':

MFRC522.cpp:201:28: error: 'UNUSED_PIN' was not declared in this scope

if (_resetPowerDownPin != UNUSED_PIN) {

                            ^

MFRC522.cpp: In member function 'MFRC522::StatusCode MFRC522::PICC_REQA_or_WUPA(byte, byte*, byte*)':

MFRC522.cpp:587:20: error: 'nullptr' was not declared in this scope

if (bufferATQA == nullptr || *bufferSize < 2) { // The ATQA response is 2 bytes long.

                  ^

MFRC522.cpp: In member function 'MFRC522::StatusCode MFRC522::PICC_HaltA()':

MFRC522.cpp:854:54: error: 'nullptr' was not declared in this scope

result = PCD_TransceiveData(buffer, sizeof(buffer), nullptr, 0);

                                                      ^

MFRC522.cpp: In member function 'MFRC522::StatusCode MFRC522::PCD_Authenticate(byte, byte, MFRC522::MIFARE_Key*, MFRC522::Uid*)':

MFRC522.cpp:903:87: error: call to 'MFRC522::StatusCode MFRC522::PCD_CommunicateWithPICC(byte, byte, byte*, byte, byte*, byte*, byte*, byte, bool)' uses the default argument for parameter 5, which is not yet defined

return PCD_CommunicateWithPICC(PCD_MFAuthent, waitIRq, &sendData, sizeof(sendData));

                                                                                       ^

MFRC522.cpp:903:87: error: call to 'MFRC522::StatusCode MFRC522::PCD_CommunicateWithPICC(byte, byte, byte*, byte, byte*, byte*, byte*, byte, bool)' uses the default argument for parameter 6, which is not yet defined

MFRC522.cpp:903:87: error: call to 'MFRC522::StatusCode MFRC522::PCD_CommunicateWithPICC(byte, byte, byte*, byte, byte*, byte*, byte*, byte, bool)' uses the default argument for parameter 7, which is not yet defined

MFRC522.cpp: In member function 'MFRC522::StatusCode MFRC522::MIFARE_Read(byte, byte*, byte*)':

MFRC522.cpp:938:16: error: 'nullptr' was not declared in this scope

if (buffer == nullptr || *bufferSize < 18) {

                ^

MFRC522.cpp:952:59: error: 'nullptr' was not declared in this scope

return PCD_TransceiveData(buffer, 4, buffer, bufferSize, nullptr, 0, true);

                                                         ^

MFRC522.cpp: In member function 'MFRC522::StatusCode MFRC522::MIFARE_Write(byte, byte*, byte)':

MFRC522.cpp:973:16: error: 'nullptr' was not declared in this scope

if (buffer == nullptr || bufferSize < 16) {

                ^

MFRC522.cpp: In member function 'MFRC522::StatusCode MFRC522::MIFARE_Ultralight_Write(byte, byte*, byte)':

MFRC522.cpp:1008:16: error: 'nullptr' was not declared in this scope

if (buffer == nullptr || bufferSize < 4) {

                ^

MFRC522.cpp: In member function 'MFRC522::StatusCode MFRC522::PCD_MIFARE_Transceive(byte*, byte, bool)':

MFRC522.cpp:1241:18: error: 'nullptr' was not declared in this scope

if (sendData == nullptr || sendLen > 16) {

                  ^

编译有误。

报告将会包含更多的信息
"在编译时,输出详细信息"
在 文件>首选项 中启用

3030257ybs 发表于 2022-9-13 13:46

Rakin 发表于 2022-8-24 19:56
Arduino:1.7.8 (Windows 8.1), 板:"Arduino Uno"

In file included from MFRC522.h:78:0,


ok,thankyou
页: [1] 2
查看完整版本: 第一篇:RFID的使用与说明