// Pin connected to the LED
const int ledPin = 2; // You can change this to the pin you are using
// Blink interval (in milliseconds)
const int blinkInterval = 200; // 500ms on, 500ms off
// Duration for blinking and continuous glow (in milliseconds)
const unsigned long blinkDuration = 2500; // 30 seconds
const unsigned long glowDuration = 5000; // 30 seconds
void setup() {
// Initialize the LED pin as an output:
pinMode(ledPin, OUTPUT);
}
void loop() {
unsigned long startTime = millis();
// Blinking phase for 30 seconds
while (millis() - startTime < blinkDuration) {
digitalWrite(ledPin, HIGH); // Turn the LED on
delay(blinkInterval); // Wait for blinkInterval milliseconds
digitalWrite(ledPin, LOW); // Turn the LED off
delay(blinkInterval); // Wait for blinkInterval milliseconds
}
// Continuous glow phase for 30 seconds
digitalWrite(ledPin, HIGH); // Turn the LED on
delay(glowDuration); // Wait for 30 seconds
// Resetting the cycle by starting over (loop function restarts)
}