 
 void setup(void) {
   Serial.begin(9600);
-  Serial.println("set baud=115200");
-  Serial.end();
-  Serial.begin(115200);
+  //Serial.println("set baud=115200");
+  //Serial.end();
+  //Serial.begin(115200);
 
   nfc.begin();
 

  
  Serial.println("r or w?");
  Serial.flush();
  if (Serial.available()) {
    rorw = Serial.read();
    if (rorw == 'w')
    {
      
    } 
    else if ( rorw == 'r')
    {
     
    }
  }

  if (false)
  {
    // Wait for an NTAG203 card.  When one is found 'uid' will be populated with
    // the UID, and uidLength will indicate the size of the UUID (normally 7)
    success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, uid, &uidLength);
    
    if (success) {
      Serial.print("UID: ");
      nfc.PrintHex(uid, uidLength);
      Serial.println("");
      
      if (uidLength == 7)
      {
        // NTAG2xx cards have 39*4 bytes of user pages (156 user bytes),
        // starting at page 4 ... larger cards just add pages to the end of
        // this range:
        
        // See: http://www.nxp.com/documents/short_data_sheet/NTAG203_SDS.pdf
  
        // TAG Type       PAGES   USER START    USER STOP
        // --------       -----   ----------    ---------
        // NTAG 203       42      4             39
        // NTAG 213       45      4             39
        // NTAG 215       135     4             129
        // NTAG 216       231     4             225      
  
        SD.remove(filename);
        myfile = SD.open(filename, FILE_WRITE);
        Serial.print("Writing ");
        Serial.println(filename);
        nfc.ntag2xx_ReadPage(0, dataBuffer); // Sometimes, the first read is too fast :)
        for (uint8_t i = 0; i < 135; i++) 
        {
          success = nfc.ntag2xx_ReadPage(i, dataBuffer);
          
          if (success) 
          {
            // Dump the page data
            nfc.PrintHexChar(dataBuffer, 4);
            myfile.write(dataBuffer, 4);
          }
          else

            Serial.println("Read Fail");
          }
        }//EndFor
    
        //Print file contents for confirmation
        //myfile.flush();
        //myfile.seek(0);
        //Serial.println("");
        //while(myfile.available()){
        //  myfile.read(dataBuffer, 4);
        //  nfc.PrintHexChar(dataBuffer, 4);
        //}
        //EndPrintFile
        
        myfile.close();
      } //EndRead
    }
    // Wait a bit before trying again
    Serial.println("Complete!\n");
  }
  else
  {
    Serial.println("Tag Fail");
  }
}

