PN532 NFC library


Hi, does any of you have the courage to help port the PN532 + NDEF libs to the Particle platform ?


@ekarlso, I had ported the Adafruit PN532 library for the Core a while back.

Perhaps if you provide links to the specific libraries you want ported, I could look.


Not sure what the specific differences are but:


I’ve done it here. It’s mixed in with all my kegerator code but you should be able to just pull out the files you need.


@jlkalberer do you have code for PN532 in I2C mode? Can you share it? I’ve just purchased a grove NFC and want to use it in I2C mode


OK, I look like I just have to download the library from , move some files to correct folders so that I can compile with Particle IDE, use the sample source code from here and it works. I’ll publish soon a library so that others can reuse it more easily.


Yeah, that’s what I started with but I used the NDEF library as well.

I had to do a bunch of tweaks to make it work better with photon like removing the sleep calls but that library should work for you.


I don’t have much experience with NFC but as I understand, NDEF is more for P2P mode, right? Can you share the code you optimize for NDEF also as a reference for me? I don’t need P2P mode at this moment but maybe in the future.


No, NDEF is basically a container/packet so you don’t have to work with raw data.

Here’s my latest version -

Here is the I2C code before I removed it from my repo -