 void loop() {
 	// Scan for RFID tags
 	int scannedID = 0;
-	bool isValidResponse = false;
-	unsigned long existingTime = 0;
-
+	isValidResponse = false;
+	
 	while (!isValidResponse) {
 		sendCommand(CMD_GET_SNR, blockID, machineID);
 		delay(waitforSerialResponse);

		Serial.write(END_CHAR);

	}

}

void serialEvent() {
	int i = 0;
	while (Serial.available()) {
		if (i > 2) {
			if (characterRead[0] == COMMAND_REGISTER) {
				id = Serial.parseInt();
			}
		}
		else {
			characterRead[i] = Serial.read();
		}
		i++;
	}
}

void getStringFromMem(int index) {


unsigned char readData[bufferSize];

volatile bool isValidResponse = false;
volatile char characterRead[bufferSize];
volatile int id = 0;

