FORGE
NFC is a great medium for small amounts of data,
such as a simple message, a weblink, or a task trigger.
This was used in great effect in Matt Brailsford’s tape
deck, where he put an NFC tag in old cassettes to
trigger a task (hsmag.cc/JSpoXa). In this case, it was
triggering Spotify playlists. The code for such a thing
is pretty straightforward: you need the NFC reader to
scan for a tag, either constantly or on a button press,
and then do something with the data it reads.
This principle works for most tasks – you just have
to choose what item you put your NFC tag into, and
what to do with the data once you’ve read it! There is
a lovely tutorial by Tony Di Cola on the Adafruit website
about making paper Minecraft blocks and using them
to build blocks in the game. There was a recent
art exhibition in Sheffield where the artist, Caroline
Claisse, used NFC data tags in items for the audience
to interact with her exhibition, triggering animations
and lighting by bringing an object up to the artwork.
The exact code will depend on the hardware you’re
using. If you buy from a maker store, they should give
you details of how to use the appropriate libraries
for your parts. Roughly, your program should follow
this pseudo-code:
Look for a NFC card or sticker.
Read the data from the sticker.
Select the block of data that is useful to you.
Do something with it.
Write new data onto a block, or all of
the blocks.
With just those few examples, you’ll realise that
NFC can bring a level of interactivity to your projects
for a large number of people, and at a relatively
low cost. If you have a light display, you could have
a number of physical objects of different colours,
and as you bring them towards a reader, the colour
changes to that of the object. The tags are generally
rewritable and you can change what they store
pretty easily.
SHARE INFORMATION EASILY
Another use for the NFC tags isn’t just in the project
- why not use them to store a link to your build
site for the project, so when you inevitably run out
of cards at an event, people can bring up your site
immediately on their phone? If you do this, be a little
bit careful which NFC tags you buy, as not all are
supported by modern phones. There’s a compatibility
chart at hsmag.cc/OCcXOd.
WHAT TO STORE?
Most Mifare Classic NFC tags (the most common
kind) will store 1kB of data. As with data cards
YOU’LL NEED
PN532 breakout
with a Raspberry
Pi 3
Pimoroni NFC
data tags and the
coloured LED nail
stickers
NFC stickers
from ZipNFC (UK
based): zipnfc.com
Midas ‘Tiny’
NTAG213 for my
initial experiments
on thumbnails
NFC reader/writer
Check your phone’s
compatibility at
hsmag.cc/HbfDRT
For the coil
Single LED
Approx 40 cm
of wire
Two bits of
heat‑shrink
Solder
Soldering iron
Left
We use many parts of
the electromagnetic
(EM) spectrum
to transfer data
and energy in our
everyday activities.
NFC is part of the
radio waves section
DIY NFC COIL
To make your own, take a piece of wire and then
thread two pieces of heat-shrink tubing onto it. Coil
the wire up so it makes several loops, keeping the LED
connected. Solder each leg of a 5 mm LED to each end
of the wire. Pull the heat-shrink tubing up to cover the
solder joints, and shrink it. Hold the coils in an NFC
field and the LED should flash. See Figure 1 overleaf.
Radio
waves
LONG WAVELENGTH
NFC
SHORT WAVELENGTH
Micro-
waves
Visible
light
UV X-ray Gamma
ray
IR
NFC is a great medium for
small amounts of data,
such as a simple message,
a weblink, or a task trigger
”
”