// 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 u
digitalWrite(13, HIGH);
delay(350); // Wait for 0.5 second (dot dot dash)
// 2s gap between characters
digitalWrite(13, LOW);
delay(2000); // Wait for 1 second
// flash n
// Dash
digitalWrite(13, HIGH);
delay(1000); // dash 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 d
// Dash
digitalWrite(13, HIGH);
delay(1000); // dash dot dot
// flash e
// Dash
digitalWrite(13, HIGH);
delay(1000); // dot
// flash r
// Dash
digitalWrite(13, HIGH);
delay(1000); // dot dash dot
// flash t
// Dash
digitalWrite(13, HIGH);
delay(1000); // dash
// 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)
}