const int button1 = 8 ;
const int button2 = 2 ;
byte tombol1 ;
byte tombol2 ;
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16,2);
void setup() {
pinMode (button1,INPUT_PULLUP);
pinMode (button2,INPUT_PULLUP);
lcd.begin (16,2);
}
void loop() {
tombol1 = digitalRead (button1);
tombol2 = digitalRead (button2);
if(tombol1 == LOW){
lcd.clear();
lcd.setCursor(2,0);
lcd.print ("TOMBOL MERAH");}
if(tombol2 == LOW){
lcd.clear();
lcd.setCursor(5,1);
lcd.print("AKTIF");
}
}