// Define the pin for the external light
//#define EXTERNAL_LIGHT_PIN 2 // You can connect your external light to any digital pin
void setup() {
// Initialize the pin for the external light as an output
pinMode(13, OUTPUT);
}
void loop() {
// Turn off the external light - delay start
digitalWrite(13, LOW);
delay(3500); // Wait for 1 second
// flash l
digitalWrite(13, HIGH);
delay(350); // Wait for 0.5 second (dot dash dot dot)
// 2s gap between characters
digitalWrite(13, LOW);
delay(2000); // Wait for 1 second
// flash e
// dot
digitalWrite(13, HIGH);
delay(1000); // dot
// Turn off the external light - red
digitalWrite(13, LOW);
delay(700); // Wait for 1 second
// dash
digitalWrite(13, HIGH);
delay(1000); // dash
// Turn off the external light - red
digitalWrite(13, LOW);
delay(700); // Wait for 1 second
// dot
digitalWrite(13, HIGH);
delay(350); // Wait for 0.5 second (dot)
// 2s gap between characters
digitalWrite(13, LOW);
delay(2000); // Wait for 1 second
// flash a
// dot dash
digitalWrite(13, HIGH);
delay(1000); // dot dash
// flash d
// dash dot dot
digitalWrite(13, HIGH);
delay(1000); // dash dot dot
// Turn off the external light - red
digitalWrite(13, LOW);
delay(700); // Wait for 1 second
// dash
digitalWrite(13, HIGH);
delay(1000); // dash
// Turn off the external light - red
digitalWrite(13, LOW);
delay(700); // Wait for 1 second
// dot
digitalWrite(13, HIGH);
delay(350); // Wait for 0.5 second (dot)
}