   // Set the max number of retry attempts to read from a card
   // This prevents us from waiting forever for a card, which is
   // the default behaviour of the PN532.
-  nfc.setPassiveActivationRetries(0xFF);
+  //nfc.setPassiveActivationRetries(0xFF);
   
   // configure board to read RFID tags
   nfc.SAMConfig();

  // Wait for an ISO14443A type cards (Mifare, etc.).  When one is found
  // 'uid' will be populated with the UID, and uidLength will indicate
  // if the uid is 4 bytes (Mifare Classic) or 7 bytes (Mifare Ultralight)
  success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, &uid[0], &uidLength);
  
  if (success) {
    //Serial.println("Found a card!");
    //Serial.print("UID Length: ");Serial.print(uidLength, DEC);Serial.println(" bytes");
    //Serial.print("UID Value: ");
    Serial.print("[");
    for (uint8_t i=0; i < uidLength; i++) 
    {
      //Serial.print(uid[i], HEX);
      if (uid[i] < 16) 
      {
        Serial.print("0");  
      }
      Serial.print(uid[i], HEX);
      if (i<uidLength-1)
      {
        Serial.print(':');
      }
    }
    Serial.println("]");
    // Wait 1 second before continuing
    //delay(5000);
  }
  //else
  //{
    // PN532 probably timed out waiting for a card
    //Serial.println("Timed out waiting for a card");
  //}
}

#include <Wire.h>
#include <Adafruit_NFCShield_I2C.h>

#define IRQ   (2)
#define RESET (3)  

Adafruit_NFCShield_I2C nfc(IRQ, RESET);

