while(TRUE)
{
// Check to see if a Tag was detected
// If yes, then the variable FoundTag will contain "MI_OK"
FoundTag = requestTag(MF1_REQIDL, TagData);
lcd_gotoxy(1,1);
printf(lcd_putc,"Checking for Tag \r\n");
if (FoundTag == MI_OK)
{
lcd_gotoxy(1,2);
printf(lcd_putc,"Encontrado ");
delay_ms(1000);
lcd_putc('\f');
Get_UID();
Search_for_matching_Tag();
delay_ms(1000);
}
else
{
lcd_gotoxy(1,2);
printf(lcd_putc,"No encontrado ");
output_high(E);
delay_ms(1000);
output_low(E);
}
}