So basically I'm using a RFID scanner, with this code at the moment: - YouTube (it'll also be attached). But as you can see it scans the code from the tags you hold in front of it. And it'll say a Card UID: ... in the console.
Now my point is, I want with certain cards a name displayed on a LCD screen, something like this:
if (card UID: ...) {
lcd.print("NAME");
}
of course I know that the expression in the if-statement is wrong, but I'm kinda new to the RFID and any help would be appreciated with the code!
So I scan a tag, I see the card UID in the serial print, and I want to use that Card UID for a certain name on a LCD screen.
How do you plan to associate names with UIDs? A database? A text file on an SD card? A linked list of structures in the program? Something else (and there are many)?
The Arduino and the RFID scanner are not prescient. You have to supply the information somehow. The way that the information gets supplied is going to determine how the "if" statement gets written.
vaj4088:
How do you plan to associate names with UIDs? A database? A text file on an SD card? A linked list of structures in the program? Something else (and there are many)?
The Arduino and the RFID scanner are not prescient. You have to supply the information somehow. The way that the information gets supplied is going to determine how the "if" statement gets written.
Then, when you have a tag, use a for loop to iterate over the struct array, and compare the tag to the tag field. If there is a match, print the associated name.