Hi,
I am trying to get the NFC shield working using SPI communication.
Here is the code I tried:
#include <SPI.h>
#include <PN532/PN532_SPI/PN532_SPI.h>
PN532_SPI pn532spi(SPI, 10);
NfcAdapter nfc = NfcAdapter(pn532spi);
#include <Wire.h>
#include <PN532/PN532_I2C/PN532_I2C.h>
PN532_I2C pn532_i2c(Wire);
NfcAdapter nfc = NfcAdapter(pn532_i2c);
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)
}
Here is the error I am getting.
I did follow all the instructions exactly as explained in:
http://wiki.seeedstudio.com/NFC_Shield_V2.0/#software-libraries-installation
Please help!
ResolveLibrary(PN532/PN532/PN532Interface.h)
In file included from D:\Dropbox\Ardruino\Seed NFC Reader\Seeed\ReadTagWithSPI\ReadTagWithSPI.ino:9:0:
-> candidates: []
C:\Program Files (x86)\Arduino\libraries\Seeed_Arduino_NFC-master\src/PN532/PN532_I2C/PN532_I2C.h:9:10: fatal error: PN532/PN532/PN532Interface.h: No such file or directory
#include “PN532/PN532/PN532Interface.h”
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI
Using library PN532_SPI in folder: C:\Program Files (x86)\Arduino\libraries\PN532_SPI (legacy)
Using library Seeed_Arduino_NFC-master at version 1.1.0 in folder: C:\Program Files (x86)\Arduino\libraries\Seeed_Arduino_NFC-master
Using library Wire at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire
exit status 1
Error compiling for board Arduino Uno.