#include <Keypad.h>
#include <LiquidCrystal.h>
const int rs=11 ,e=12 ,d4=17, d5=16, d6=15 ,d7=14;
LiquidCrystal lcd( rs, e, d4, d5, d6, d7);
const byte ROW=4;
const byte COL=4;
char hexkey[ROW][COL]={
{'1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'*','0','#','D'}
};
int a=0;
int pass[5];
byte rowpin[ROW]={9,8,7,6};
byte colpin[COL]={5,4,3,2};
Keypad cust=Keypad(makeKeymap(hexkey),rowpin,colpin,ROW,COL);
void setup() {
lcd.begin(16,2);
//Serial.begin(9600);
// put your setup code here, to run once:
lcd.print("hello");
delay(3000);
lcd.clear();
}
void loop() {
// put your main code here, to run repeatedly:
//for(int i=0;i<0;i++){
char chart=cust.getKey();
if(chart!=0){
lcd.setCursor(a,0);
lcd.print(chart);
pass[a]=chart;
//Serial.print(pass[i]);
a++;
}
//}
//for(int i=0;i<5;i++){
// }
}