#include <LiquidCrystal.h>
#include <Keypad.h>
const uint8_t brs = 4;
const uint8_t kol = 4;
char tbl[brs][kol] = {
{ '1', '2', '3', 'A' },
{ '4', '5', '6', 'B' },
{ '7', '8', '9', 'C' },
{ '*', '0', '#', 'D' }
};
uint8_t brsPin[brs] = { 7, 6, 5, 4 }; // Pins connected to R1, R2, R3, R4
uint8_t kolPin[kol] = { 3, 2, 1, 0 }; // Pins connected to C1, C2, C3, C4
Keypad keypad = Keypad(makeKeymap(tbl), brsPin, kolPin, brs, kol);
LiquidCrystal lcd(13,12,11,10,9,8);
void setup(){
lcd.begin(16,2);
lcd.print("Welcome to LCD");
delay(1000);
lcd.clear();
}
void loop(){
lcd.setCursor(3, 0);
lcd.print("D3TEM UWHS");
char key = keypad.getKey();
if (key != NO_KEY) {
lcd.setCursor(0, 1);
lcd.print(key);
}}