I am new to Arduino and am working on a model train project. I have a SparkFun Qwiic sensor kit 15209 and SEN-09417. I plan to place an RFID card (actually a small "disk") under the engine of each of three locomotives. I have RFID sensors at locations on each of three track lines. I simply want to read the disk and know which of the three trains Is passing over the RFID sensor.
Does anyone have code for such an operation? I am using the SparkFun_Qwiick_Rfid.h library.
If not here are my three questions.
When the first tag is read, the interrupt goes low. It stays low thereafter. Is there a way to reset the interrupt? If so, how?
I am using an Arduino Mega. When I use myRfid.getTag, what type of return do I get back? String? Char?
I want to compare the RETURN (I think it is named "tag", to an already known "tag". How do I do that? Do you have code segments for such an operation?
I am sorry for being vague. I don't know what else to say. Here is a link to the product and in that link there are Arduino sketches. Nothing in there helps me use the "tag" number for any useful purpose. I can't even find out what the structure of the "tag" digits are (other than being a 13 digit number) that is sent to the Arduino when a "tag" comes into proximity tot he detector. I was hoping someone who has worked on the Qwiic RFID IDXXCA would be able to help. SparkFun Qwiic RFID-IDXXLA Hookup Guide - SparkFun Learn.
Okey. Just reading Rfid tags ought to give result searching topics.
Suppose a tag is just only a 13 number of digits. Then comparing that 13 digit number with the table of other defined 13 digit Ids would not be that hard.
I use a Dutch system named iTrain to control 30 trains on some 100-150 sections. That system uses other technichs....
Have a look! Link: iTrain - Layout control for Windows, macOS and Linux (berros.eu)
Thanks for your suggestion. I will look at iTrain. You would think that I would be able to look at the 13 bit number from the sensor and compare it to a list of numbers. But I can't seem to make that work. I was hoping someone would post an Arduino sketch that would do such a simple task.
Do have a look. It's a very powerful train control system. To be honest I don't understand the system in Your train driving. Trains go to where You set the points...
Post the code You have made and we will check. I've not been playing with those Rf things but reading data sheets and specs is home territory.