int t = 100; // one unit of time in milliseconds void setup() { pinMode(13, OUTPUT); // LED pin is OUTPUT } void dot() { // LED on pause LED off pause digitalWrite(13, HIGH); delay(1*t); digitalWrite(13, LOW); delay(1*t); } void dash() { digitalWrite(13, HIGH); delay(3*t); digitalWrite(13, LOW); delay(1*t); } void letter() { // extra delay at end of letter delay(2*t); // plus one unit from end of dot/dash = 3 units } void word() { // extra delay at end of word delay(6*t); // plus one unit from end of dot/dash = 7 units } void loop() { dot(); dot(); dot(); letter(); // S dash(); dash(); dash(); letter(); // O dot(); dot(); dot(); word(); // S }