/* Modified Blink Program Sends out the SOS distress signal in Morse code. This distress signal is originally established for maritime use but is now used internationally. In the language of Morse code, the letter ā€œSā€ is three short dots and the letter ā€œOā€ is three longer dashes. This program will blink a LED ON rapidly for 3 times then slowly for 3 times repeatedly. modified 21 March 2020 by Ting Kok Eng */ int LED = 4; // the setup function runs once when you press reset or power the board void setup() { // initialize digital pin LED_BUILTIN as an output. pinMode(LED, OUTPUT); } // the loop function runs over and over again forever void loop() { /* The code below produced Long Blink for the morse code letter "O" */ digitalWrite(LED, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(LED, LOW); // turn the LED off by making the voltage LOW delay(200); // wait for a half second digitalWrite(LED, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(LED, LOW); // turn the LED off by making the voltage LOW delay(200); // wait for a second digitalWrite(LED, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(LED, LOW); // turn the LED off by making the voltage LOW delay(200); // wait for a half second /* The code below produced Short Blink for the morse code letter "S" */ digitalWrite(LED, HIGH); // turn the LED on (HIGH is the voltage level) delay(400); // wait for half a second digitalWrite(LED, LOW); // turn the LED off by making the voltage LOW delay(200); // wait for half a second digitalWrite(LED, HIGH); // turn the LED on (HIGH is the voltage level) delay(400); // wait for half a second digitalWrite(LED, LOW); // turn the LED off by making the voltage LOW delay(200); // wait for half a second digitalWrite(LED, HIGH); // turn the LED on (HIGH is the voltage level) delay(400); // wait for half a second digitalWrite(LED, LOW); // turn the LED off by making the voltage LOW delay(200); // wait for half a second }