IoT Project, Setting up Keypad with the password
Arudino KeyPad Program
IoT Project, Setting up Keypad with the password

This project is about configuring Keypad. Keypad has many uses in the IoT world. For example, you can use it as the password entry for locking and unlocking something. You can read an article here which is about the use of Keypad with Servo Motor. For this project, we have also a complete and step-by-step tutorial which you can watch here.


#include <Keypad.h>

const byte ROWS = 4; //Four rows
const byte COLS = 4; //Four columns
char keys[ROWS][COLS] = {
byte rowPins[ROWS] = {9, 8, 7, 6}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {5, 4, 3, 2}; //connect to the column pinouts of the keypad

Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );

String v_passcode="";

void setup(){

void loop(){
  char key = keypad.getKey();
  if (key != NO_KEY){
    v_passcode = v_passcode + key;
    	Serial.println("Enter Password");
    	Serial.println("Validate the Password");
      	if (v_passcode=="589D")
          Serial.println("Access Granted");
        	Serial.println("Access Denied");

You can follow our YouTube Tutorial regarding this project, and use the above code based on your own needs. You can also access the actual TinkerCad Project by clicking here.


Share on facebook
Share on twitter
Share on whatsapp
Share on linkedin
Share on telegram
Share on email

1 thought on “IoT Project, Setting up Keypad with the password”

Leave a Comment

Your email address will not be published.

You might also enjoy