#include <Keypad.h>
#include <LiquidCrystal_I2C.h>
int lockOutput = 13;
byte data_count = 0;
char key;
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 rPins[ROWS] = {9, 8, 7, 6};
byte cPins[COLS] = {5, 4, 3, 2};
Keypad keypad = Keypad(makeKeymap(keys), rPins, cPins, ROWS, COLS);
LiquidCrystal_I2C lcd(0x27,16,2);
void setup() {
// put your setup code here, to run once:
lcd.init();
lcd.backlight();
pinMode(lockOutput,OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
char key = keypad.getKey();
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Enter Password: ");
}