 	Post: Response packet contains serial number of selected tag and data.
 
 */
-void MF_READ(unsigned char numBlocks, unsigned char startAddress) {
+void readCard(unsigned char numBlocks, unsigned char startAddress) {
 	int i = 0;
 	unsigned char A[] = { 0x00, 0x0A, CMD_READ, 0x01, numBlocks, startAddress,
-						0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
+						keyA[0], keyA[1], keyA[2], keyA[3], keyA[4], keyA[5] };
 	unsigned char BCC = checksum( A, sizeof(A)/sizeof(A[0]) );
 	unsigned char CMD[] = { STX, 0x00, 0x0A, CMD_READ, 0x01, numBlocks, startAddress,
-                          0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, BCC, ETX };
+                          keyA[0], keyA[1], keyA[2], keyA[3], keyA[4], keyA[5], BCC, ETX };
 
 	Serial.println("Reading data...");
 	//Serial.println(startAddress);

#define CMD_GET_SNR 0x25

#define rejectNote 123
#define acceptNote 440

#define classCheck 0xDD
#define machineID 0x05

SoftwareSerial RDM880(RDM880_RX, RDM880_TX);




	// Write time data to card
	if (elapsedTime != 0) {
		writeCard(blockID, machineID, elapsedTime + existingTime);
		delay(waitforSerialResponse);
		responseFlag = getResponse(readData);
		if (!responseFlag) {
			Serial.println("Unexpected result");
		}
		Serial.println("Card updated. You may now remove it.\n");
		delay(timeToRemoveCard);
	}
	else {
		Serial.println();
	}

	delay(scanInterval);
}

void soundFeedback(bool reject) {
	if (reject) {
		tone(speakerPin, rejectNote, rejectDuration);
		delay(rejectInterval);
		tone(speakerPin, rejectNote, rejectDuration);
		delay(rejectInterval);
		tone(speakerPin, rejectNote, rejectDuration);
	}
	else {
		tone(speakerPin, acceptNote, acceptDuration);
	}
}

bool getResponse(unsigned char response[]) {
	int i = 0;

	while (RDM880.available()) {
		response[i] = RDM880.read();
		/*Serial.print(response[i], HEX);
		Serial.print(" ");*/
