Hey, I have made a simple program for reading bytes from my RFID Module.
However I have a problem with the Serial Monitor. I get values from the RFID Reader but it seems to occupy the serial traffic.
When i try to write something to the serial monitor it does not appear, tho when scanning tags i get prints.
The RFID Module i am using is: RDM630
And I am using Ardunio Uno
Hey, thanks so much for the help. I have updated my program to use this library, but I have still have some difficutlies with the printing.
Whenever i print it comes out like this:
How can I make it print like it should?
I know that the RFID reads a start bit and a stop bit which it seems to print as a space.
Any help on this would be appreciated.
You know how many bytes there are supposed to be in a valid tag. Why are you using dynamic memory allocation in the form of a String? Stop that.
Use a static array of the proper size, and an index to define where the store the next byte.
You need to actually pay attention to the values received. There is a byte that indicates the start of a tag, and one that indicates the end of a tag. They are the characters that print funny.
When the proper byte indicating the start of the tag arrives, set the index to 0 and put a NULL in the 0th position of the array.
Then, each time another character arrives, see if it is the end marker. If not, add it to the array at the index position, increment the index, and store another NULL at the index position. If it is, set a flag that indicates that the array contains a full tag.