A secure, embedded door lock system built with Mbed OS, supporting user and admin authentication, persistent user management, and a keypad interface. Designed for microcontroller platforms, this project demonstrates robust access control, flash-based credential storage, and modular embedded design.
- User & Admin Authentication: Separate roles for normal users and administrators
- Keypad Input: Hardware keypad for password entry
- Persistent Storage: User credentials stored in microcontroller flash memory
- Admin Menu: Add, remove, or update users and passwords
- Visual Feedback: SLCD display and LEDs for status indication
- Lockdown Mode: Security lockout after repeated failed attempts
- Debounced Input: Reliable keypad input handling
- Mbed CLI
- Supported Mbed OS hardware (e.g., NXP/Freescale Kinetis)
- Clone the repository:
git clone https://github.com/Kwash67/door-lock-system.git cd door-lock-system - Import Mbed OS dependencies:
mbed deploy
- Build the project:
Replace
mbed compile -m <TARGET> -t <TOOLCHAIN>
<TARGET>and<TOOLCHAIN>with your board and toolchain (e.g.,K64F,GCC_ARM). - Flash to device:
- Drag-n-drop the
.binfile to your board, or usembed flash.
- Drag-n-drop the
On boot, the system prompts for a password via the keypad. Users and admins have different access:
while (true) {
if (tries <= max_tries) {
while (!inputModule.hasPassword()) {
inputModule.processInput();
}
if (inputModule.hasPassword()) {
const char* password = inputModule.getEnteredPassword();
auth = userManager.authenticate(password);
}
if (auth == 'u') {
openDoor();
inputModule.reset();
} else if (auth == 'a') {
userManager.launch_admin();
inputModule.reset();
} else if (auth == 'x') {
// Failed attempt logic
}
} else {
// Lockdown logic
}
}- For issues, use the GitHub Issues page
- See
CONTRIBUTING.mdfor contribution guidelines - License: See
LICENSE - Mbed OS docs: os.mbed.com/docs/mbed-os/latest/
- Maintained by: Kwashie Andoh
- Contributions welcome! Please see
CONTRIBUTING.md
This project is not affiliated with Arm Mbed. For hardware support, visit the Mbed forums.
See the system in action on the FRDM KL46Z board: