RFID-How to enter a RFID tag code into a single variable??-HELP
panayiotis96
Posts: 2
Hello everyone,
I despairingly trying to get the code of an RFID tag and enter it in a single variable so that i can perform if-statements.
I have both RFID reader and 5 passive tags and i'm using the source code that offered by parallax. I am also using the Basic Stamp microcontroller.
I'm trying to create a student's identification system where each student will have his own tag. When the tag is passed from the scanner all the details of the student will be appeared on a computer screen. So if i had the tag code by using an if-statement i will preview the student's details using the debug command. But into the source code offered by parallax the code is previewed on the screen by debugging 10 times each character.
My knowledge on programming this equipment is relatively pure so can you please help me?? I'll really appreciate it!!
Thank you so much
I despairingly trying to get the code of an RFID tag and enter it in a single variable so that i can perform if-statements.
I have both RFID reader and 5 passive tags and i'm using the source code that offered by parallax. I am also using the Basic Stamp microcontroller.
I'm trying to create a student's identification system where each student will have his own tag. When the tag is passed from the scanner all the details of the student will be appeared on a computer screen. So if i had the tag code by using an if-statement i will preview the student's details using the debug command. But into the source code offered by parallax the code is previewed on the screen by debugging 10 times each character.
My knowledge on programming this equipment is relatively pure so can you please help me?? I'll really appreciate it!!
Thank you so much
Comments
Some of the bits of the RFID tag code contain a code for the manufacturer of the tags and this is always fixed. You may be able to check once for this part of the RFID code. You may find that the part of the code that is unique to each tag is only 16 or 24 bits and you may be able to make the entries in your student table smaller and use a simpler IF statement.
I still suggest that you use the whole 40-bit RFID tag code with entries in the student table 5 bytes in size and use the subroutine in the example code to look up tags in a table. The subroutine gives you the number of the entry in the table or a value that indicates that the tag is not in the table. This entry number is small and will fit in a single byte and makes the rest of your code much easier as long as you don't change the table.