Firmware flow
How a released keypad key is handled
Selected keypad input and backspace branch.
A press is remembered. After release, a valid key is mapped and the timeout restarts. In the shown backspace branch, the final character is removed only when the input is not empty.
This is only part of the password-entry routine. It does not show password comparison, fingerprint verification or door control.
Read the implementation
getPasswordFromKeypad excerpt · selected source lines 110–130. Source inspection is not a hardware test.
uint8_t currentKey = keypad.getKey();
lcd.setCursor(0, 0);
lcd.print("Enter Password:");
if (currentKey != I2C_KEYPAD_NOKEY) {
lastKey = currentKey;
wasPressed = true;
} else if (wasPressed) {
wasPressed = false;
if (lastKey < 16) {
char key = keymap[lastKey];
startTime = millis(); // 🔄 Reset timeout on key press
switch (key) {
case 'D': // Backspace
if (inputBuffer.length() > 0) {
inputBuffer.remove(inputBuffer.length() - 1);
Serial.println("Deleted last character");
}
break;Open the exact source-level diagramTechnical notes
Entry and enrolment
handleKeypadInput() handles keypad entry; addFingerprint() handles fingerprint enrolment.
Stepper actuation
stepperMove() handles motion separately from input parsing.
Local status feedback
The local display and serial interfaces provide feedback during device interaction.