/* Medium mode: ⁣ pre code your microcontroller to send a Morse code 1 word message and challenge a friend, family member, your colleagues or your instructor to figure it out. (Refer to the schedule) */ void setup() { // put your setup code here, to run once: pinMode(LED_BUILTIN, OUTPUT); } void loop() { // Spelling Pizza in Morse Code //P digitalWrite(LED_BUILTIN, HIGH); // turning the LED on delay(1000); // LED stays on for a 1 second (dot) digitalWrite(LED_BUILTIN, LOW); // turning the LED off delay(500); // LED stays off for 0.5 second (gap) digitalWrite(LED_BUILTIN, HIGH); // turning the LED on delay(2000); // LED stays on for a 2 seconds (dash) digitalWrite(LED_BUILTIN, LOW); // turning the LED off delay(500); // LED stays off for 0.5 second (gap) digitalWrite(LED_BUILTIN, HIGH); // turning the LED on delay(2000); // LED stays on for a 2 seconds (dash) digitalWrite(LED_BUILTIN, LOW); // turning the LED off delay(500); // LED stays off for 0.5 second (gap) digitalWrite(LED_BUILTIN, HIGH); // turning the LED on delay(1000); // LED stays on for a 1 second (dot) digitalWrite(LED_BUILTIN, LOW); // turning the LED off delay(3000); // LED stays off for 3 seconds (gap between letters) //I digitalWrite(LED_BUILTIN, HIGH); // turning the LED on delay(1000); // LED stays on for a 1 second (dot) digitalWrite(LED_BUILTIN, LOW); // turning the LED off delay(500); // LED stays off for 0.5 second (gap) digitalWrite(LED_BUILTIN, HIGH); // turning the LED on delay(1000); // LED stays on for a 1 second (dot) digitalWrite(LED_BUILTIN, LOW); // turning the LED off delay(3000); // LED stays off for 3 seconds (gap between letters) //Z digitalWrite(LED_BUILTIN, HIGH); // turning the LED on delay(2000); // LED stays on for a 2 seconds (dash) digitalWrite(LED_BUILTIN, LOW); // turning the LED off delay(500); // LED stays off for 0.5 second (gap) digitalWrite(LED_BUILTIN, HIGH); // turning the LED on delay(2000); // LED stays on for a 2 seconds (dash) digitalWrite(LED_BUILTIN, LOW); // turning the LED off delay(500); // LED stays off for 0.5 second (gap) digitalWrite(LED_BUILTIN, HIGH); // turning the LED on delay(1000); // LED stays on for a 1 second (dot) digitalWrite(LED_BUILTIN, LOW); // turning the LED off delay(500); // LED stays off for 0.5 second (gap) digitalWrite(LED_BUILTIN, HIGH); // turning the LED on delay(1000); // LED stays on for a 1 second (dot) digitalWrite(LED_BUILTIN, LOW); // turning the LED off delay(3000); // LED stays off for 3 seconds (gap between letters) //Z digitalWrite(LED_BUILTIN, HIGH); // turning the LED on delay(2000); // LED stays on for a 2 seconds (dash) digitalWrite(LED_BUILTIN, LOW); // turning the LED off delay(500); // LED stays off for 0.5 second (gap) digitalWrite(LED_BUILTIN, HIGH); // turning the LED on delay(2000); // LED stays on for a 2 seconds (dash) digitalWrite(LED_BUILTIN, LOW); // turning the LED off delay(500); // LED stays off for 0.5 second (gap) digitalWrite(LED_BUILTIN, HIGH); // turning the LED on delay(1000); // LED stays on for a 1 second (dot) digitalWrite(LED_BUILTIN, LOW); // turning the LED off delay(500); // LED stays off for 0.5 second (gap) digitalWrite(LED_BUILTIN, HIGH); // turning the LED on delay(1000); // LED stays on for a 1 second (dot) digitalWrite(LED_BUILTIN, LOW); // turning the LED off delay(3000); // LED stays off for 3 seconds (gap between letters) //A digitalWrite(LED_BUILTIN, HIGH); // turning the LED on delay(1000); // LED stays on for a 1 second (dot) digitalWrite(LED_BUILTIN, LOW); // turning the LED off delay(500); // LED stays off for 0.5 second (gap) digitalWrite(LED_BUILTIN, HIGH); // turning the LED on delay(2000); // LED stays on for a 2 seconds (dash) digitalWrite(LED_BUILTIN, LOW); // turning the LED off delay(10000); // LED stays off for 3 seconds (morse code finished) }