Qwiic RFID SEN-09417

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.

  1. 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?
  2. I am using an Arduino Mega. When I use myRfid.getTag, what type of return do I get back? String? Char?
  3. 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?

There's hardly any code that fits directly.

Please post any code You have and schematics. Your description is hard to understand and reply to.

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 - learn.sparkfun.com.

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.

  1. I don't know; you might have to ask that question at https://forum.sparkfun.com/ if you don't get answers here.
  2. look at the example that comes with the library (SparkFun_Qwiic_RFID_Arduino_Library/Example1_Read_Tag_Basics.ino at master · sparkfun/SparkFun_Qwiic_RFID_Arduino_Library · GitHub); the tag variable is declared as a String (with capital S).
  3. Because tag is a String, you can use if (tag == "someTag")
  1. Have you tried the clearTags() method? It might do the trick.

Thank you. I had tried that and it didn't work, but when I tried it again it seems to be working. Appreciate the help.

I hadn't thought of that. I will try it. THANK YOU