int led1 = 10;
int led2 = 9;
int led3 = 8;
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);
void setup() {
// put your setup code here, to run once:
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
lcd.init();
lcd.setCursor(3,0);
lcd.print(" RIKO ASEP ");
lcd.setCursor(3,1);
lcd.print(" semangat");
delay(1500);
lcd.clear();
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(led1, HIGH);
lcd.setCursor(3,0);
lcd.print(" STOP!! ");
lcd.setCursor(3,1);
lcd.print("LAMPU MERAH!!!!");
delay(1500);
lcd.clear();
delay(3000);
digitalWrite(led1, LOW);
delay(100);
digitalWrite(led2, HIGH);
lcd.setCursor(2,0);
lcd.print("LAMPU KUNING");
lcd.setCursor(2,1);
lcd.print(" HATI-HATI ");
delay(1500);
lcd.clear();
delay(1000);
digitalWrite(led2, LOW);
delay(100);
digitalWrite(led3, HIGH);
lcd.setCursor(1,0);
lcd.print(" GO!!!GO!!GO!! ");
lcd.setCursor(3,1);
lcd.print(" GAS JALAN ");
delay(1500);
lcd.clear();
delay(3000);
digitalWrite(led3, LOW);
delay(100);
digitalWrite(led2, HIGH);
lcd.setCursor(2,0);
lcd.print(" LAMPU KUNING ");
lcd.setCursor(2,1);
lcd.print(" HATI-HATI ");
delay(1500);
lcd.clear();
delay(1000);
digitalWrite(led2, LOW);
delay(100);
}