RDM630 serial (UART) RFID module: library to aid in reading Tags

I have created (with some help) a Library for my alarm system, so that i could read and match RFID tags, using a RDM630 module, bought off eBay.

here are the code components needed in your sketch:

#include <rfid_reader.h>

self explanatory. it won’t work if we don’t include it. :wink:

RFID_Read RFIDr(2);

creates the object “RFIDr” (name it whatever you like), and sets the memory to allocate for 2 tags to be added below. the “2” must be greater than or equal to the number of tags.

in setup():

Serial.begin(9600); // port for displaying read ID
    Serial1.begin(9600); // RFID reader port.
    RFIDr.addRFID(1466133); // enter up to 100 RFID tag codes
    RFIDr.addRFID(829731); // each with their own entry, like here.

The first Serial port is for whatever. i have used it here as a debugging output.
the second Serial port is what the RDM630 is connected to. it should work with Software serial too, if you are using an UNO (example uses a MEGA2560).
then the two tags, “1466133” and “829731” are the decimal tag numbers to match against. change to use the tags you have. those are the tags i tested with.

in loop():


This block of code reads the selected UART port, Serial1 on a MEGA2560 in this example, and feeds it to the library.

if (RFIDr.Available())

checks if a matched tag is available “RFIDr.Available()”, and if so, it grabs the tag from the library that was matched. the function “RFIDr.What()” must be called to reset the Available() flag.

I have tested with my RDM630 several times, and i think i have it pretty reliable now. :smiley:

the library code is available on my GitHub, HERE.