// Define the LED pins for NodeMCU
const int redPin = 26; // Red LED connected to D1
const int yellowPin = 26; // Yellow LED connected to D2
const int greenPin = 26; // Green LED connected to D3
void setup() {
// Initialize the LED pins as outputs
pinMode(redPin, OUTPUT);
pinMode(yellowPin, OUTPUT);
pinMode(greenPin, OUTPUT);
}
void loop() {
// Red LED blinks for 5 seconds
digitalWrite(redPin, HIGH); // Turn on red LED
delay(5000); // Wait for 5 seconds
digitalWrite(redPin, LOW); // Turn off red LED
// Yellow LED blinks for 3 seconds
digitalWrite(yellowPin, HIGH); // Turn on yellow LED
delay(3000); // Wait for 3 seconds
digitalWrite(yellowPin, LOW); // Turn off yellow LED
// Green LED blinks for 8 seconds
digitalWrite(greenPin, HIGH); // Turn on green LED
delay(8000); // Wait for 8 seconds
digitalWrite(greenPin, LOW); // Turn off green LED
}