     Serial.print(F("."));
   #endif
 
-  // if a tag is found, we continue
-  weHaveATag = nfc.tagPresent(1000);
-  if (weHaveATag) {
+  // if a tag is found, we continue - this implementation uses the Speedmaster Library and Don's NDEF lib
+  #ifdef NFCNDEF
+    weHaveATag = nfc.tagPresent(1000);
+  #endif
+
+  // if a tag is found, we continue - this implementation uses the Adafruit PN532 library alone
+  #ifdef NFCTRACKDB
+    weHaveATag = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, uid, &uidLength);
+  #endif
+  
+  if (weHaveATag || resumeLast) {
     #ifdef DEBUG
       Serial.println(F(" tag found!"));
     #endif


// volume control variables for the analog poti
#ifdef VOLUMEPOT
  const byte volPotPin     = A0;      // the analog input pin that we use for the potentiometer
  word lastVolSensorValue  = 0;       // keeps the last read sensor value
#endif

// control buttons definition
#ifdef BUTTONS
  const byte btnLinePin    = A1;      // pin on which the button line (4 buttons) is connected
  
  word btnVal;                        // stores the value we receive on the btnLinePin for comparance with the predefined analog reads for the 4 buttons
  const byte btnValDrift   = 5;       // maximum allowed difference + and - the predefined value for each button we allow
  const word btnPressDelay = 500;     // delay in milliseconds to prevent double press detection
  unsigned long btnPressTime = 0;     // time in millis() when the button was pressed
  const word btnLightValue = 1021;    // 33 Ohm  - The value we receive from analog input if the Light On/Off Button is pressed
  const word btnPauseValue = 933;     // 1K Ohm  - The value we receive from analog input if the Pause Button is pressed
  const word btnNextValue  = 1002;    // 220 Ohm - The value we receive from analog input if the Next (aka Fast Forward) Button is pressed
  const word btnPrevValue  = 991;     // 330 Ohm - The value we receive from analog input if the Previos (aka Prev or Rewind) Button is pressed
  const word minBtnValue   = 800;     // we use this value to determine, whether or not to check the buttons. Set to lower val than smallest of buttons
#endif

// IR remote control 
#ifdef IRREMOTE
  const byte iRRemotePin   = A4;      // the pin the IR remote control diode (receiver) is connected to
  
  // IR Remote control
  // to reduce PROGMEM size I decided to not use the whole decimal value for each button on the remote control but instead do a calculation 


// battery control
#ifdef LOWBAT
  const byte lowBatPin      = A2;      // pulled high to BAT but when the charger detects a low voltage (under 3.2V) the pin will drop down to 0V (LOW)
  boolean lowBatWarn        = true;    // we use this bool so we may only tell the user every 5 Minite sthat the Battery is low
#endif


