 			// check for OFF signal aka falling edge
 			else if(previousState == HIGH && signalState == LOW) {
 				// calculate elapsed time
-				endTime = (millis() - startTime)/1000 - (2 * pollCounter);
+				endTime = (millis() - startTime)/1000;
 				if(endTime != 0) {
 					Serial.print("Elapsed time: ");
 					Serial.println(endTime);

	}


	// Write time data to card
	MF_WRITE(0x01, 0x05, elapsedTime);
	delay(200);
	responseFlag = getResponse(readData);
	if(responseFlag == false) Serial.println("Unexpected result");
	

}

// Start and End bytes for command/response packets
#define STX 0xAA
#define ETX 0xBB
#define MSB 0xFF

// MiFare Classic commands
#define CMD_READ 0x20
