#include <LiquidCrystal_I2C.h>
#define I2C_ADDR 0x27
#define LCD_COLUMNS 16
#define LCD_LINES 2
#define button 8
LiquidCrystal_I2C lcd(I2C_ADDR, LCD_COLUMNS, LCD_LINES);
void setup() {
// put your setup code here, to run once:
lcd.init();
lcd.backlight();
Serial.begin(9600);
pinMode(button, INPUT_PULLUP);
}
void loop() {
// put your main code here, to run repeatedly:
bool buttonWrite = digitalRead(button);
if (buttonWrite) {
delay(100);
lcd.setCursor(0, 0);
lcd.print("UNIVERSITAS");
lcd.setCursor(0, 1);
lcd.print("GUNADARMA");
return;
} else{
lcd.clear();
return;
}
}