//Created by Barbu Vulc.
//LCD I2C library:
#include <LiquidCrystal_I2C.h>
//LCD I2C address 0x27, 16 column and 2 rows!
LiquidCrystal_I2C lcd(0x27, 16, 2);
const int greenLedPin = 2;
const int yellowLedPin = 3;
const int redLedPin = 4;
void setup() {
// Initialize the LED pins as outputs
pinMode(greenLedPin, OUTPUT);
pinMode(yellowLedPin, OUTPUT);
pinMode(redLedPin, OUTPUT);
}
void loop() {
// Turn on the green LED
digitalWrite(greenLedPin, HIGH);
// Keep the green light on for 5 seconds
delay(5000);
// Turn off the green LED
digitalWrite(greenLedPin, LOW);
// Turn on the yellow LED
digitalWrite(yellowLedPin, HIGH);
// Keep the yellow light on for 2 seconds
delay(2000);
// Turn off the yellow LED
digitalWrite(yellowLedPin, LOW);
// Turn on the red LED
digitalWrite(redLedPin, HIGH);
// Keep the red light on for 5 seconds
delay(5000);
// Turn off the red LED
digitalWrite(redLedPin, LOW);
// Optional: Add a short delay before restarting the cycle
delay(1000);
}