Arduino NFC

Maker Faire - May 2013

Presented by Don Coleman / @doncoleman

What is NFC?

What can I do with NFC?

  • Mobile Payments
  • Sharing Data between Phones
  • Contact Info on Conference Badge
  • Pair with Bluetooth Device
  • Mass Transit Card
  • Smart Poster
  • Hack Stuff



Tags hold a tiny amount of data

Think bytes

not kilobytes, megabytes, or gigabytes

Tag Types

Common properties

  • UID
  • Type
  • Technology
  • Capacity
  • Is Locked
  • Is Lockable

Each tag type

  • Stores data in different binary format
  • Has different security features
  • Has different ways to read and write


NFC Data Exchange Format

NDEF Message

NDEF Record

NDEF Record

  • TNF (Type Name Format)
  • Type
  • Payload
  • Record Id

TNF - Type Name Format

Indicates the structure of the value of the type field

TNF Constants

  • Empty
  • Well Known
  • Mime Media
  • External


Identifier describing the type of the Payload

Must follow rules implied by TNF


Data for the user application

Empty Record

  • TNF = Empty

Text Record

hello, world

  • TNF = Well Known
  • Type = T
  • Payload = 2 + en + hello, world

URI Record

  • TNF = Well Known
  • Type = U
  • Payload = 0x3 +

Mime Media Record

  • TNF = Mime Media
  • Type = application/json
  • Payload = { "message": "hello, world" }

Helper Methods

Quick Review...

NDEF Message

One or more NDEF Records

NDEF Record

Contains a payload of data

Information describing the payload

Adafruit NFC Shield

Adafruit's Library

NDEF Library

for Arduino



Write Tag

Read Tag



you will run out

Peer to Peer

(not yet)

Seeed Studio NFC Shield V2.0

Android Apps for NFC

Read Tags PhoneGap NFC Reader

Format and Unformat Mifare Classic Tags NXP Tag Writer

View Raw Data on Tag NFC Tag Info

Technical Specs


Thank You

Don Coleman




Creative Commons License
Arduino NFC by Don Coleman is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Based on a work at