Arduino Keypad Door Lock

You can Open or Close a lock using keypad with the help of  Arduino. All you need is an Arduino, servo motor and Keypad. In this video, we are going to show you how to make an arduino project for home automation to open or close door using a password. Write a program to take input from keypad and open or close the door based on the password received from smartphone. Let’s look at the required components:

16 comments

  • youssef

    Password library please

  • Please Can any one send the correct code
    Mail to- benazouz.marouaibtihal@gmail.com

  • Sourin Ghosh

    what are the different types libraries required for this?

  • Code alsjeblieft stuur naar mellefransen20@gmail.nl

  • Pllzz give me code on rohankochhar1000@gmail.com other wise my money will waste

  • Please Can any one send the correct code
    Mail to-anushab699@gmail.com

  • code don´t work error message at line ” case ‘1’: password.reset();servo1.write(90);break;”
    stray 342 in program

  • I copied the code, and pasted it as you wrote above. but get the error message stray342 in program

  • #include
    #include
    #include
    Servo servo1;
    Password password = Password( “3262” );
    const byte ROWS = 4;
    const byte COLS = 4;
    char keys [ROWS][COLS] = {
    {‘1’, ‘2’, ‘3’, ‘A’},
    {‘4’, ‘5’, ‘6’, ‘B’},
    {‘7’, ‘8’, ‘9’, ‘C’},
    {‘*’, ‘0’, ‘#’, ‘D’}
    };
    byte rowPins [ROWS] = {3, 2, A1, A2 };
    byte colPins [COLS] = {7, 6, 5, 4};
    Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS);
    void setup() {
    Serial.begin(9600);
    servo1.attach(9);
    keypad.addEventListener (keypadEvent);
    }
    void loop() {
    keypad.getKey();
    }
    void keypadEvent (KeypadEvent eKey) {
    switch (keypad.getState()){
    case PRESSED:
    switch (eKey) {
    case ‘*’: checkPassword(); break;
    case ‘1’: password.reset();servo1.write(90);break;
    default: password.append(eKey);
    }
    }
    }
    void checkPassword(){
    if (password.evaluate()){
    servo1.write(180);
    } else {
    servo1.write(90);
    }
    }

  • Nico Smit

    Where’s the code?
    Please

  • Can i get the source code please ?

  • did u get the code

  • Mowmita

    Can i get the source code plz

  • shakhawat

    please give us the source code.
    u did’nt shared the source code and without it your project will go in vain.
    which one you shared in Youtube is not working (uploading error).
    please give me the modified one which one is workable .
    mail me at shakhawat.eu@gmail.com
    thanks

  • qarandoon

    Plz give me Program code

Comments are closed.