#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);
int button1 = 13;
int button2 = 12;
int button3 = 11;
int button4 = 10;
int sbutton1 = 0;
int sbutton2 = 0;
int sbutton3 = 0;
int sbutton4 = 0;
int ytta = 0 ;
void setup() {
pinMode(button1, INPUT);
pinMode(button2, INPUT);
pinMode(button3, INPUT);
pinMode(button4, INPUT);
lcd.begin(16,2);
lcd.backlight();
lcd.setCursor(0,0);
lcd.print("nama: ");
lcd.setCursor(0,1);
lcd.print("tanggal lahir: ");
}
void loop() {
if(sbutton1==HIGH){
ytta=1;
}
else if(sbutton2==HIGH){
ytta=2;
}
else if(sbutton3==HIGH){
ytta=3;
}
else if(sbutton4==HIGH){
ytta=4;
}
if(ytta==1){
lcd.clear();
lcd.begin(16,2);
lcd.backlight();
lcd.setCursor(0,2);
lcd.print("m. kevin ramadhan") ;
lcd.setCursor(2,0);
lcd.print("17-09-2008") ;
}
else if(ytta==2){
lcd.clear();
lcd.begin(16,2);
lcd.backlight();
lcd.setCursor(0,3);
lcd.print("nama: kevin") ;
lcd.setCursor(3,0);
lcd.print("counter:(36)");
} // put your main code here, to run repeatedly:
}