while(rfid.available())
{
if(rfid.read() == 255)
{
for(int i=1;i<11;i++)
{
Tag[i]= rfid.read();
}
}
}
}
So, if there is one byte available to read, read all 12 of them. Got it. Perhaps you need to rework this bit of rubbish.
void loop()
{
read_serial();
}
Now, it's a great idea to use functions, but this is ridiculous.
char buffer[1];
for(int index = 8; index>4; index--)
{
itoa(Tag[index], buffer,16);
Tag[n] contains a byte, in the range 0 to 255. Converting that to a hex string will result in a string between "00" to "FF". Even if the leading 0 is suppressed, the trailing NULL that itoa() adds means that the array size needs to be at least 3 elements, not 1.
TagID = TagID += buffer;
Waste, waste, waste. You REALLY need to figure out exactly what this statement is doing. You probably will not believe the amount of resources this simple (mangled) statement consumes.