Using NFC with Arduino: Odopod library available on Github

In our work related to Connected Objects and the Internet of Things, we've built a few different devices capable of reading Near Field Communication (NFC) tags.

NFC is a Radio Frequency Identification (RFID) technology that allows two devices to exchange messages while in extremely close proximity.

We're developing new service experiences based on the ability to add inexpensive NFC tags to physical objects and recognize them when placed on or next to connected objects that are embedded with NFC readers.

For this, we've used a few different NFC readers that are compatible with Arduino micro-controllers.

The readers we've used include:
1. The Adafruit PN532 Controller Shield
2. The Adafruit PN532 Controller Breakout Board
3. The Seeed Studio PN532 NFC Shield

Since all three boards use the PN532 NFC chip, they respond to the same command set and can read all common NFC tag formats. Depending on the application, each of these readers has it's advantage. For example, the Adafruit breakout board runs at 3.3v, making it ideal for use with the Arduino FIO.

The libraries available for each reader are largely similar, but not completely interchangeable. Additionally, the libraries don't easily support all the features we need, especially in regards encoding and decoding NDEF messages.

To simplify the process of switching between readers and tag formats, we created a single library that supports these three boards, I2C and SPI communication, and a variety of NDEF message formats written to Mifare Classic and Ultralight tags.

We've posted the library on Github in hopes that others will find it useful and help add features to it. If you are an Arduino developer working with NFC, have a look and let us know what you think in the comments below.

Comments

  • Kennedy Kong says:
    Posted: 02.07.13

    this might be expensive, but you should totally have NFC ID cards so you can swipe tv and it shows your picture, fun fact about you or a quote relavent to you. maybe your favorite sports team stats, or game, or favorite new sources.... etc. I might actually make this out of your code. :D thanks

  • Jacky says:
    Posted: 03.07.13

    Really interesting proposition. NFC will then make a great http://www.asianclassic.net/ impact in the near future.

  • Mary says:
    Posted: 03.07.13

    NFC is definitely going to make a world of http://www.ishanghaiescort.com difference to the new world.

  • Stefano Falconetti says:
    Posted: 04.03.13

    Hi, just tried out changing the library for working with Arduino Due. I can read a badge but not NFC on a Samsung NFC enabled phone. Do you have maybe a sample for reading NFC ? Thanks, Stefano.

  • Pedro Werneck says:
    Posted: 04.27.13

    Any plans on adding Peer to Peer NFC?

  • astonyWaymn says:
    Posted: 11.27.13

    Renal Failure And Crestor Ignarro Blood Pressure Nobel Laureate . Nizoral Regrowth Stop Hair Loss And Cia Free Viagra Samples <a href=https://archive.org/details/TramadolCodOvernightDelivery>Buy Tramadol Online In Florida</a> Periactin For Sleep Appetite Stimulant Orlando Arthritis Research Center Take Care Men Skin Anastrozole Order Prescription . Non Prescription Bystolic Online Ziac Without Otc Cardura Dose Prescription <a href=https://archive.org/details/OrderXanaxCodOvernightShipping>Buy Xanax Online Mexico</a>. Take Diclofenac And Ibuprofen Together Without A Prescription Online Buy Hydrocodone Previcox For Cancer Hytech Weight Loss Physycians Directed Hy Tech .

  • Maverik0106 says:
    Posted: 12.11.13

    If this actually works, you've actually done what I've been working on for a week and a half... I have been trying to write/modify a function to write to a NFC Ultralight Tag.... have you had any successes using a chinese NFC module? they're also using the PN532 NFC chip, but if you're using Adafruit's library just modified, they kinda filter out those chinese modules. Please let me know if you've tried those modules. I'll also try your library and let you guys know if it works. Thanks!

  • vlvrd says:
    Posted: 02.10.14

    Hi, I'm trying to use the I2C library with an Arduino Uno and a Seeed NFC Shield V2.0, but it seems the Arduino isn't finding the PN532. Have you tried that configuration? I'm just connecting everything and uploading the read_mifare example. Am I missing something?

  • mikeeugine says:
    Posted: 11.17.14
  • yoni says:
    Posted: 02.19.15

    vlvrd: i had the same problem with my Elechouse pn532 nfc shield. what to do to fix: 1) make sure all connections aren't loose! (wires etc) 2) make sure you you have all 6 wires connected for SPI 3) make sure you have the NDEF and SPI libraries. good luck!

Want to say something?

Your comment may be reviewed by a moderator for approval.

Founder, Technical Director

  @davidbliss

WANT A REGULAR DOSE?

subscribe

Odopod is now Nurun

We're still in San Francisco, still under the same leadership, still doing great work (here are some case studies). But now we're a lot larger. We've joined a host of Nurun offices around the globe, all part of Publicis Worldwide.

Our focus remains on helping clients succeed in a connected world with products and services that transform the consumer experience.

We continue to work with forward-thinking, longstanding clients including Tesla, Google, Sony and Audemars Piguet. More recently, we've established new relationships with Dolby, the San Francisco 49ers, GoPro, and Blu Homes.

We welcome the opportunity to work with you too.

Tim, Dave, & JT


The best way to reach us

For new business, contact Allison McCarthy
allison.mccarthy@nurun.com

For general inquiries, contact us at
sf@nurun.com

For more about Nurun, visit
www.nurun.com