首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Arduino Uno & NFC盾牌

Arduino Uno & NFC盾牌
EN

Stack Overflow用户
提问于 2016-08-19 21:37:28
回答 1查看 295关注 0票数 0

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

我已经上传了所有需要的库。然而,当我尝试这个代码片段时;

代码语言:javascript
复制
#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板

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

谢谢

EN

回答 1

Stack Overflow用户

发布于 2016-08-26 10:54:54

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

所以使用NFC板来读取PN53x标签。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39040489

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档