Keypad Door Lock
Type a code on a membrane keypad to open a servo latch.

Overview
The keypad is scanned as a matrix of rows and columns. A correct code swings the servo to release the latch; a wrong code blinks the red LED and beeps.
Build Steps
Wire the keypad
Connect the eight rows and columns to digital pins and set them as inputs with pull-ups; the library handles the matrix scan.
Read key presses
Accumulate digits into a buffer, with * to clear and # to submit the code.
Drive the latch
On a correct code, move the servo to the open angle, light the green LED, wait three seconds and re-lock.
Handle wrong codes
Blink the red LED, sound the buzzer and require a short lockout after three failures.
Related Projects
Automatic Plant Watering System
Water plants only when the soil is dry, using a moisture sensor, relay and small pump.
View project →Ultrasonic Distance Meter
Measure distance with an HC-SR04 and show it on a 16×2 LCD.
View project →Motion-Activated Night Light
Switch a light on automatically when a PIR sensor detects movement.
View project →