Published using Google Docs
2. OLD - Arduino External LED & SOS
Updated automatically every 5 minutes

Arduino External (wired up) LED & S.O.S

Hardware

For this assignment you must wire up LED with your breadboard. Use your teacher’s example and/or ask for help.

Software - The Ship is Going Down!! Send the S-O-S 

Note: There is a final 20% version of this assignment that requires a substantial rewrite of the code.

  1. Create a new sketch called Arduino_SOS OR use the Blink Example code and save as Arduino_SOS
  2. Using the Blink example code as a starting point, write the code to send S O S in morse code.   Morse code is described here:  http://www.omniglot.com/writing/morsecode.htm

Dash = 0.5 second

Dot = 0.25 seconds

Pause for a half second between  dashes and dots and one full second between letters

Turn on the led

Wait while it is on

Turn off the led

Pause before turning it on again

Demo your assignment to your teacher.  Do NOT dismantle the wiring afterwards as you may need it for the next activity.

Final 20% - Using functions and arrays

  1. Create a function called morse() that takes in a letter as a parameter (as a String or a char).  
  1. In the global variable area, create an array that holds the letters S, O, S, pause.
  1. In the loop() function, use a for loop to call the morse function for each letter. (see code below)

                morse(i);

        }

  1. Test the code by changing the array to include both valid and invalid letters.