#include <Keypad.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);

const int BARIS = 4;
const int KOLOM = 4;

char keys[BARIS][KOLOM] = { {'1', '2', '3', 'A'}, {'4', '5', '6', 'B'}, {'7', '8', '9', 'C'}, {'*', '0', '#', 'D'}
};

byte rowPins[BARIS] = {14, 12, 19, 18};
byte colPins[KOLOM] = {5, 4, 2, 15};

//Keypad customKeypad = Keypad(makeKeymap(Keys), rowPins, colPins, ROWS, COLS);  //Masukkan info keypad pada library
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, BARIS, KOLOM);

char Key;
int number = 0;
int password = 1379;
int line=1;
int col=10;

/*
 lcd.setCursor(0, 1);
  lcd.clear();
*/

void setup() {
  Serial.begin(9600);
  lcd.init();
  lcd.setBacklight(HIGH);
}
void loop() {
  lcd.setCursor(0, 0);
  lcd.print("Eenter Password");
  Key = keypad.getKey();

  if (Key)
  {
      lcd.setCursor(1,10);
       Serial.print(Key);
      delay(250);
      }

}