Read the forum guidelines to see how to properly post code and some hints on how to get the most from this forum. Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.
The program is functioning correctly, but the new value appears as the following below.
I am trying to get one whole value as shown [TR19115022214] instead of every three numbers.
Thank You
Serial Ready
[RFtagid] Ready
[TR191] [TR150] [TR22] [TR214].... etc.
That only works for null-terminated character strings. Since your array doesn't include a terminator, you have to specify the number of bytes to send: myserial.print(command_scantag, 3);
Did you want more than one byte per output message? That would be more like:
if (myserial.available())
{
Serial.print("[TR");
while (mySerial.available())
{
incomingByte = myserial.read();
if (incomingByte < 0x10)
Serial.print('0'); // Leading 0
Serial.print(incomingByte, HEX);
}
Serial.println("]");
}
How does the output algorithm find out when you are done sending data? It is just spitting out each byte as it receives it.
P.S. It is more usual to output this kind of info as a chain of 2-digit hexadecimal value. Why do you want decimal? How will you tell apart 191-150-22 and, say, 19-11-50-22 ? If you go for BF9616, no doubt is possible: 2 chars, one byte, always.
Each passive tag I use the value changes on the 11th string of numbers. Is there a way to display just the 11th string of numbers? Ex [TR86]
[TR191][TR150][TR22][TR214][TR182][TR150][TR246][TR182][TR54][TR214][TR86][TR235][TR249][TR0]