     // Display some basic information about the card
     //Serial.println("Found an ISO14443A card");
     //Serial.print("  UID Length: ");Serial.print(uidLength, DEC);Serial.println(" bytes");
-    Serial.print("  UID Value: ");
-    nfc.PrintHex(uid, uidLength);
-    Serial.println("");   
+    //Serial.print("  UID Value: ");
+    //nfc.PrintHex(uid, uidLength);
+    uint32_t val = *(uint32_t *)uid;
+    Serial.println(val, HEX);
+    Serial.println("");
+    return val;
   }
-  String direction = "";
 
-  for (int szPos=0; szPos < uidLength; szPos++) {
-      if (uid[szPos] <= 0xF)
-      direction.concat("0");
-      direction.concat(String(uid[szPos]&0xff, HEX));
-  }
-  return direction;
 }
 
 static void handleCollision(byte collisionData)


    if(checkTimer.isTimeReached()) {
        Serial.println("timeout");
        cardval = readNFC();
        Serial.println(cardval);

        Serial.println(oldcardval);
        if(! cardval.equals(oldcardval)) {
          oldcardval = cardval;
          Serial.println(oldcardval);
          Serial.println("card change");
          // different card
          if(cardval.equals("56721eff")) {
            Serial.println("stop card");
            bot_drive = 0;
          } else if(cardval.equals("3662bbfd")) {
            bot.turn(270);
          }
        } else {
          if(bot_drive) {
            bot.drive(10);
          } else {
            bot.stop();
          }
        }
      }

    if (!bot.isQFull()) {  // fill up the move queue to get the speed up
        //setLEDColour(0,1,0); // Green, because we are happily doing something

String cmd; // cmd received over serial - builds up char at a time
Adafruit_PN532 nfc(PN532_SCK, PN532_MISO, PN532_MOSI, PN532_SS);
DMTimer checkTimer(2000000);
uint32_t cardval;
uint32_t oldcardval = 0;
bool bot_drive = 1;


void setup()
{
