I have another question, similarly relating to this.
I want the program to print out when the card validates, and also when the card doesnt validate. Ive tried this:
if(memcmp(master, target_tag[n], TAG_LEN) == 0 ) //Compares two bytes of TAG_LEN, if they are a match, the argument will be 0, thus 0 == 0
{
Serial.println("This Card is a Match!");
}
else if(memcmp(master, target_tag[n], TAG_LEN) != 0)
{
Serial.println("This Card is NOT a Match!");
}
If it validates, it outputs once. If it doesnt validate, it outputs twice- for each tag it reads in.
What I want it to do is compare vs both tags, and then if it validates, great, output once - like its already doing. If not, output ONCE as well. Any suggestions of how to get that to work?