Simultaneous RFID Tag Reader Hookup Guide

Pages
Contributors: Nate
Favorited Favorite 8

Using the Arduino Library

We've written an Arduino library for the M6E-NANO RFID module which takes care of all of the serial communication, byte manipulations, and CRC verifications.

Note: This example assumes you are using the latest version of the Arduino IDE on your desktop. If this is your first time using Arduino, please review our tutorial on installing the Arduino IDE.

The easiest way to install the library is through the Arduino Library manager by searching SparkFun RFID. If you have not previously installed an Arduino library, please check out our tutorial on installing an Arduino library.

You can also manually install the library with the following download from GitHub.

Once you’ve installed the library, you should see the Example sketches by navigating to File > Examples > SparkFun Simultaneous RFID Tag Reader Library > Examples.

M6E NANO RFID Example Menu

Arduino Library Settings

Arduino Library Update: We've updated this library to work with this board and the Simultaneous RFID Reader - M7E Hecto. This version of the library includes a few new definitions for user to select which module they're using, which serial (software or hardware), and the RFID reader's baud rate.

The latest release of this library includes new definitions users should take note of before uploading and using the examples.

Serial Selection

When using this board with Software Serial uncomment the following lines and adjust the pins for RX/TX if necessary:

#include <SoftwareSerial.h>
SoftwareSerial softSerial(2, 3); //RX, TX

The next option selects which type of serial is used. The code lists a couple of examples for both software serial and hardware so adjust the definition as needed. For example, if you're using a software serial library, define this as softserial. If you're using a hardware serial port on your development board, select the serial port (eg. Serial1) as shown below:

// #define rfidSerial softSerial // Software serial (eg. Arudino Uno or SparkFun RedBoard)
#define rfidSerial Serial1 // Hardware serial (eg. ESP32 or Teensy)

Baud Rate Selection

Next, you'll want to define the baud rate for rfidBaud. We recommend using the settings shown below with 38400 when using software serial and 115200 when using hardware serial:

// #define rfidBaud 38400
#define rfidBaud 115200

Module Selection

Since this library supports both the M6E Nano and M7E Hecto, you'll need to define which module you are using. Adjust or comment/uncomment the moduleType definition to set it to the correct module:

// #define moduleType ThingMagic_M6E_NANO
#define moduleType ThingMagic_M7E_HECTO