I noticed that there were a couple spots in the code where door 2 was being unlocked, but the timer for door1 was being set. So you get the state where when you badge into door 2, it never relocks the door.
Here is the diff:
Index: Open_Access_Control_Mega_Hack_Factory_v3.ino
===================================================================
--- Open_Access_Control_Mega_Hack_Factory_v3.ino (revision 172)
+++ Open_Access_Control_Mega_Hack_Factory_v3.ino (working copy)
@@ -507,10 +507,10 @@
}
case 5: //added allow keypad access for selected
{
- logAccessGranted(reader2, 2); // Log and unlock door 1
+ logAccessGranted(reader2, 2); // Log and unlock door 2
alarmState(0);
armAlarm(0); // Deactivate Alarm
- door1locktimer=millis();
+ door2locktimer=millis();
doorUnlock(2); // Unlock the door.
// keypadGranted=1;
}
@@ -563,7 +563,7 @@
alarmState(0);
armAlarm(0); // Deactivate Alarm
chirpAlarm(1);
- door1locktimer=millis();
+ door2locktimer=millis();
doorUnlock(2); // Unlock the door.
keypadGranted=1;