 
 int doorEvent = 0;
 
-int toneDisableTimeout;
-int toneEnabled = 0;
-
 int soundDelayTimeout = 0;
 
 int lockTransitionTimeTimeout = 0;

void playSong();
void lockDoor();
void unlockDoor();
bool isCardAuthorized();
void cleanBuffer();
void reportOpened();
bool isBufferValid(int cyclicBufferPosition);
void copyFromBuffer(int cyclicBufferPosition);
void dumpCardToSerial();
void cardAccepted();
void cardRejected();


{
	if (soundDelayTimeout == 0)
	{
		tone(pinPiezo, toneRejected, toneDuration);
		soundDelayTimeout = 500;
	}
}
