#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
bool button, status = 0;
void setup() {
pinMode(25, INPUT_PULLUP);
pinMode(26, OUTPUT);
lcd.init();
lcd.backlight();
}
void loop() {
button = digitalRead(25);
if(button == 0){
if(status == 0){
status = 1;
} else {
status = 0;
}
}
digitalWrite(26, status);
lcd.setCursor(0,0);
if(status == 0){
lcd.print("Mati");
} else {
lcd.print("Menyala");
}
delay(500);
lcd.clear();
}