RFID Tag Compare

PeterH:
By the way, that's far from the worst code I've seen but in order to convince myself the logic was sound I reformatted it to put each { and } on a separate line with matching pairs indented by the same amount; I suggest you adopt that code style. I also suggest that you get into the habit of putting { and } after any if/else statement. Sure, it might work without it now when you only have one statement, but you've no idea how many times I've seen people tack an extra statement on the end - or inadvertently use a macro that expanded to more than one statement - and introduce a subtle bug. Use { and } to make the control structure as clear and robust as possible.

Well this is practically the example given on the Arduino website for use with the ID-12. I just manipulated it for my purpose.

PaulS:
Putting each { on a new line, and using Tools + Auto Format would help.

So would including the value of n in the output:

              Serial.print("Card ");

Serial.print(n);
              Serial.println(" is NOT a Match!");

I am using Auto-format. I'll implement the Card (n) into the code and see what happens.