#include <LiquidCrystal.h>
#include <Keypad.h>
#include <LiquidCrystal.h>
const int Rows=4;
const int Cols=4;
const int rs=12,en=11,d4=5,d5=4,d6=3,d7=2;
LiquidCrystal lcd(12,11,5,4,3,2);
char Keys[Rows][Cols]={
{'1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'*','0','#','D'}
};
byte rowPins[Rows]={10,9,8,7};
byte colPins[Cols]={13,6,1};
Keypad customKeypad=Keypad(makeKeymap(Keys),rowPins,colPins,Rows,Cols);
void setup() {
lcd.begin(16,2);
lcd.print("Key prassed");
}
void loop() {
char customKey=customKeypad.getKey();
if(customKey){
lcd.setCursor(0,1);
lcd.print(customKey);
}
}