I am using the Arduino Mega with the SparkFun Simultaneous RFID Reader - M6E Nano and an external UHF RFID antenna. I am making a prototype for a security solution for the logistics industry. I need to place an array of RFID tags, say 100 of those, arranged in such a way that they within range of the antenna. I need to be able to count the number of RFID tags every 1min or so, to check if any are missing.
I got all the Arduino library examples working for this Sparkfun reader (e.g. Range Test, Constant RFID read) but I am unsure of how to adapt the library to address my specific case. It seems that the RFID reader randomly scans for any tags, often reading the same tag multiple times. How do I use the Sparkfun library to count the number of unique tags?
Right now, I have an idea of adapting the “RFID_Constant_Read” example. My idea is to store EPC numbers into an array. Whenever it gives a EPC number, I will check whether it is already in the array or not. I will only add it into the array if it is not already in the array because it is a new unique tag. After letting the RFID reader do its scanning for about 30 seconds, I will then check the size of the array to determine the number of unique tags. Will this work? I bought Sparkfun RFID tags. A related issue is whether they all have a unique EPC number?
Any code advice would be helpful. I am not a professional engineer or programmer, so some code examples would be great.