Trying to use the NFC Shield by Seeed-Studio PN532 library on Arduino

393 Views Asked by At

I bought this NFC Shield for my Arduino controller.

https://www.reichelt.de/arduino-shield-nfc-v2-pn532-ard-shd-nfc-v2-p191287.html?PROVID=2788&gclid=Cj0KCQjwnv71BRCOARIsAIkxW9HRIoBqh_ij1c8Kgh8S5l-aCqeCL1c67U8G7OStFVa8SAnW_ZD3V0saAtJxEALw_wcB&&r=1

https://www.seeedstudio.com/NFC-Shield-V2-0.html?utm_source=blog&utm_medium=blog

I downloaded and installed this library as instructed from GitHub https://github.com/Seeed-Studio/PN532

But when I include the library I get an error: Code:

include "PN532_SPI.h"

Error message: ResolveLibrary(PN532/PN532/PN532Interface.h) In file included from D:\OneDrive\Ardruino\NFC Reader\Seeed\Example Code\2020-05-14\2020-05-14.ino:1:0: -> candidates: []

C:\Program Files (x86)\Arduino\libraries\PN532_SPI/PN532_SPI.h:6:10: fatal error: PN532/PN532/PN532Interface.h: No such file or directory

include "PN532/PN532/PN532Interface.h"

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

compilation terminated.

What could be the problem? Please help?

1

There are 1 best solutions below

0
On

I managed to fix it. One has to open each and every file in the library and remove the path PN532/PN532_SPI/ So just the file name included must remain, with no path. So all the .cpp and .h files Open all .cpp and all .h files in the library and edit them... Notepad does not format the files correctly, I had to use Visual Studio to edit the .h and .cpp files.