Controlling hotel room access with Arduino and NFC – Part 2
In this recipe, we create an Arduino application that will read the encrypted data from the NFC card and compare it with the room number it has been configured to.
Getting ready
We assume that an Arduino ship has been connected properly with an Adafruit NFC shield and that the Arduino software and drivers are correctly installed and working.
How to do it...
We will retrieve the data from the tag and compare it with the encrypted room number:
Download the
arduino_NFC
library from https://github.com/odopod/arduino_NFC.Download
AESLib
from https://github.com/DavyLandman/AESLib.Download the
arduino-base64
library from https://github.com/adamvr/arduino-base64.Navigate to the Arduino software installation directory and extract both downloaded libraries to the folder libraries.
Open the Arduino software and create a new script. Navigate to Sketch | Import Library…, where both libraries should be present as shown in the following screenshot...