【问题标题】:Arduino Uno & NFC ShieldArduino Uno 和 NFC 盾牌
【发布时间】:2016-08-19 13:37:28
【问题描述】:

我正在尝试在 NFC shield 和 arduino uno 之间建立连接。我使用的是seeedstudio nfc shield v2.0。

我已上传所有必需的库。但是,当我尝试这段代码时 sn-p;

#include <SPI.h>
#include "PN532_SPI.h"
#include "PN532.h"
#include "NfcAdapter.h"

PN532_SPI interface(SPI, 10); // create a PN532 SPI interface with the SPI CS terminal located at digital pin 10
NfcAdapter nfc = NfcAdapter(interface); // create an NFC adapter object

void setup(void) {
    Serial.begin(115200); // begin serial communication
    Serial.println("NDEF Reader");
    nfc.begin(); // begin NFC communication
}

void loop(void) {

Serial.println("\nScan an NFC tag\n");

if (nfc.tagPresent()) // Do an NFC scan to see if an NFC tag is present
{
    NfcTag tag = nfc.read(); // read the NFC tag into an object, nfc.read() returns an NfcTag object.
    tag.print(); // prints the NFC tags type, UID, and NDEF message (if available)
}
   delay(500); // wait half a second (500ms) before scanning again (you may increment or decrement the wait time)
}

我收到一条错误消息:

NDEF 阅读器 没找到PN53x板子

有人知道我的问题吗?我该怎么办?

谢谢

【问题讨论】:

    标签: arduino nfc arduino-uno


    【解决方案1】:

    PN53x 板是 NFC 读卡器,不能被其他 NFC 读卡器(如手机)读取。 NFC有两种模式:阅读器和标签。 标签可以被Reader读取。

    所以使用 PN53x 板读取一个 nfc 标签。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-10-22
      • 2013-06-05
      • 2017-12-05
      • 1970-01-01
      相关资源
      最近更新 更多