Slow_SOS.cpp

void
setup()
{
  pinMode( 13, OUTPUT );
}

enum { DOT_PAUSE = 200 };

enum { DASH_PAUSE = 3 * DOT_PAUSE };

enum { LETTER_PAUSE = 4 * DOT_PAUSE };

enum { WORD_PAUSE = 2000 };

void
dot()
{
  digitalWrite( 13, HIGH );
  delay( DOT_PAUSE );
  digitalWrite( 13, LOW );
  delay( DOT_PAUSE );
}

void
dash()
{
  digitalWrite( 13, HIGH );
  delay( DASH_PAUSE );
  digitalWrite( 13, LOW );
  delay( DOT_PAUSE ); 
}

void
send_s()
{
  dot();
  dot();
  dot();
  delay( LETTER_PAUSE );
}

void
send_o()
{
  dash();
  dash();
  dash();
  delay( LETTER_PAUSE );
}

void
send_SOS()
{
  send_s();
  send_o();
  send_s();
}

void
loop()
{
  send_SOS();
  delay( WORD_PAUSE ); 
}