#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
const int button = 25;
const int led = 26;
bool status = 0;
void setup() {
Serial.begin(9600);
lcd.init();
lcd.backlight();
pinMode(button, INPUT_PULLUP);
pinMode(led, OUTPUT);
}
void loop() {
bool buttonRead = digitalRead(button);
Serial.println(buttonRead);
// lcd.setCursor(0,0);
// lcd.print("tombol: ");
// lcd.print(buttonRead);
if (buttonRead == 0){
if (status == 0){
status = 1;
} else {
status = 0;
}
}
digitalWrite(led, status);
delay(500);
}