Skip to content

Instantly share code, notes, and snippets.

@DenverDias
Created August 16, 2013 18:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DenverDias/6252264 to your computer and use it in GitHub Desktop.
Save DenverDias/6252264 to your computer and use it in GitHub Desktop.
Setting up a construct for playing morse code
void playLetter(char x)
{
switch (x):
case 'E':
dit(); return;
case 'T':
dah(); return;
case 'A':
di();dah(); return;
case 'O':
dah();dah();dah(); return;
/*Insert more alphabets here*/
case ' ':
delay(wordSpace);
/* We've inserted the wordSpace delay to make sure it relaxes when the letter is a space */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment