/************************************************
https://chatgpt.com/share/ab1dc79a-2d76-4bd2-b59d-f64f8b2e3ea4

****************/
#include <Adafruit_NeoPixel.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

#define PIN        2   // The pin connected to the NeoPixel strip
#define NUMPIXELS  3  // The number of LEDs in the strip

Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
LiquidCrystal_I2C lcd(0x27, 20, 4); // Set the LCD I2C address to 0x27 for a 20 chars and 4 line display

void setup() {
  strip.begin();
  strip.show(); // Initialize all pixels to 'off'
  Serial.begin(9600); // Start serial communication at 9600 baud
  lcd.init(); // Initialize the LCD
  lcd.backlight(); // Turn on the backlight
}

void loop() {
  showRed();
  delay(8000); // Red for 10 seconds
  showYellow();
  delay(5000); // Yellow for 5 seconds
  showGreen();
  delay(10000); // Green for 12 seconds
}

void showRed() {
  strip.setPixelColor(0, strip.Color(255, 0, 0)); // Red
  strip.setPixelColor(1, strip.Color(255, 0, 0)); // Red
  strip.setPixelColor(2, strip.Color(255, 0, 0)); // Red
  strip.show();
  Serial.println("Stop");
  lcd.clear();
  lcd.setCursor(8,1); // Set cursor to the first line
  lcd.print("Stop");
}

void showYellow() {
  strip.setPixelColor(0, strip.Color(255, 255, 0)); // Yellow
  strip.setPixelColor(1, strip.Color(255, 255, 0)); // Yellow
  strip.setPixelColor(2, strip.Color(255, 255, 0)); // Yellow
  strip.show();
  Serial.println("Wait");
  lcd.clear();
  lcd.setCursor(8, 1); // Set cursor to the first line
  lcd.print("Wait");
}

void showGreen() {
  strip.setPixelColor(0, strip.Color(0, 255, 0)); // Green
  strip.setPixelColor(1, strip.Color(0, 255, 0)); // Green
  strip.setPixelColor(2, strip.Color(0, 255, 0)); // Green
  strip.show();
  Serial.println("Go");
  lcd.clear();
  lcd.setCursor(8, 1); // Set cursor to the first line
  lcd.print("Go");

  lcd.setCursor(5,2 ); // Set cursor to the first line
  lcd.print("by Kai29");






}
nano:12
nano:11
nano:10
nano:9
nano:8
nano:7
nano:6
nano:5
nano:4
nano:3
nano:2
nano:GND.2
nano:RESET.2
nano:0
nano:1
nano:13
nano:3.3V
nano:AREF
nano:A0
nano:A1
nano:A2
nano:A3
nano:A4
nano:A5
nano:A6
nano:A7
nano:5V
nano:RESET
nano:GND.1
nano:VIN
nano:12.2
nano:5V.2
nano:13.2
nano:11.2
nano:RESET.3
nano:GND.3
ring1:GND
ring1:VCC
ring1:DIN
ring1:DOUT
lcd1:GND
lcd1:VCC
lcd1:SDA
lcd1:SCL