//Rangkaian Led Nyala Bergantian Dengan Tampilan Status Led Pada LCD
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);
#define ledMerah 4
#define ledHijau 2
void setup() {
lcd.init(); lcd.backlight();
pinMode(ledMerah, OUTPUT);
pinMode(ledHijau, OUTPUT);
}
void loop() {
digitalWrite(ledMerah, HIGH);
digitalWrite(ledHijau, LOW);
lcd.setCursor(0,0); lcd.print("LED1 NYALA ");
delay(6000);
digitalWrite(ledMerah, LOW);
digitalWrite(ledHijau, HIGH);
lcd.setCursor(0,0); lcd.print("LED2 NYALA ");
delay(6000);
}