  * I would not be in charge of your use of this software
  *  (c) guigur.com 2015
  */
- 
+
+ /*
+  * TODO:
+  * changer les pins 6 & 7 de l'encoder pour les pins 2 & 3  et vice versa -> interrupts
+  */
+  
 #include <Wire.h>
 #include <PN532_I2C.h>
 #include <PN532.h>

  if (newPosition != oldPosition)
  {
    oldPosition = newPosition;
    Serial.println(newPosition / 2);
  }
}


        {
          // Starting of a new sector ... try to to authenticate
          Serial.print("------------------------Sector ");Serial.print(currentblock/4, DEC);Serial.println("-------------------------");
           Serial.print("keys used:");
           for (uint8_t i = 0; i < 5; i++)
           {
            Serial.print(" ");Serial.print(KeyA_List_D3[currentblock/4][i], HEX);
           }
           Serial.println("");
           
          if (currentblock == 0)
          {
              success = nfc.mifareclassic_AuthenticateBlock (uid, uidLength, currentblock, 1, KeyA_List_D3[0]);
              buzy = true;
          }
          else
          {
              success = nfc.mifareclassic_AuthenticateBlock (uid, uidLength, currentblock, 1, KeyA_List_D3[currentblock/4]);
          }
          if (success)
          {
