// Define the pins for LEDs
/*const int ledPin1 = 13; // Pin connected to the first LED
const int ledPin2 = 8; // Pin connected to the second LED
// Define the delay times (in milliseconds)
const int fastBlink = 300; // Fast blink delay
const int slowBlink= 1500; // Slow blink delay
void setup() {
// Initialize the LED pins as outputs
pinMode(ledPin1, OUTPUT);
pinMode(ledPin2, OUTPUT);
}
void loop() {
// Blink the first LED (fast)
digitalWrite(ledPin1, HIGH); // Turn the LED on
delay(fastBlink); // Wait
digitalWrite(ledPin1, LOW); // Turn the LED off
delay(fastBlink); // Wait
digitalWrite(ledPin1, HIGH); // Turn the LED on
delay(fastBlink); // Wait
digitalWrite(ledPin1, LOW); // Turn the LED off
delay(fastBlink); // Wait
digitalWrite(ledPin1, HIGH); // Turn the LED on
delay(fastBlink); // Wait
digitalWrite(ledPin1, LOW); // Turn the LED off
delay(fastBlink); // Wait
digitalWrite(ledPin1, HIGH); // Turn the LED on
delay(fastBlink); // Wait
digitalWrite(ledPin1, LOW); // Turn the LED off
delay(fastBlink); // Wait
digitalWrite(ledPin1, HIGH); // Turn the LED on
delay(fastBlink); // Wait
digitalWrite(ledPin1, LOW); // Turn the LED off
delay(fastBlink); // Wait
// Blink the second LED (slow)
digitalWrite(ledPin2, HIGH); // Turn the LED on
delay(slowBlink); // Wait
digitalWrite(ledPin2, LOW); // Turn the LED off
delay(slowBlink); // Wait
digitalWrite(ledPin2, HIGH); // Turn the LED on
delay(slowBlink); // Wait
digitalWrite(ledPin2, LOW); // Turn the LED off
delay(slowBlink); // Wait
digitalWrite(ledPin2, HIGH); // Turn the LED on
delay(slowBlink); // Wait
digitalWrite(ledPin2, LOW); // Turn the LED off
delay(slowBlink); // Wait
}*/
// Pin numbers for the LEDs
const int fastBlinkLedPin = 13;
const int slowBlinkLedPin = 8;
// Interval for fast blinking LED (in milliseconds)
const long fastBlinkInterval = 500; // 500 ms
// Interval for slow blinking LED (in milliseconds)
const long slowBlinkInterval = 1500; // 1500 ms
void setup() {
// Initialize the LED pins as outputs
pinMode(fastBlinkLedPin, OUTPUT);
pinMode(slowBlinkLedPin, OUTPUT);
}
void loop() {
// Blink fast LED 5 times
for (int i = 0; i < 5; i++) {
digitalWrite(fastBlinkLedPin, HIGH); // Turn fast LED on
delay(fastBlinkInterval / 2); // Wait half the interval
digitalWrite(fastBlinkLedPin, LOW); // Turn fast LED off
delay(fastBlinkInterval / 2); // Wait half the interval
}
// Blink slow LED 3 times
for (int i = 0; i < 3; i++) {
digitalWrite(slowBlinkLedPin, HIGH); // Turn slow LED on
delay(slowBlinkInterval / 2); // Wait half the interval
digitalWrite(slowBlinkLedPin, LOW); // Turn slow LED off
delay(slowBlinkInterval / 2); // Wait half the interval
}
// Add a delay before repeating the pattern
delay(1000); // 1 second delay between patterns
}