Ok so I’ve been learning Morse code in my spare time in order to be able tell if the Arduino's led is emmiting the correct codes or not. I’ve learnt about ¾ of it but I still think the board chucks them out too fast for me to understand.
Now to the code itself, I know how to turn the led on/off its pretty simple. But giving the board a phrase and having it output that in light dot’s and dashes is another story. I signed up to the Arduino and a few other forums to see if anyone could render me their assistance in how to start of with this coding piece. And they all pretty much said the same thing, “Start by defining the variables and the led HIGH and LOW”.
Mentally I kind of have the coding fleshed out. From past experiences of programming in many languages I knew this much:
- Define the variables (dots, dashes, led pins and most importantly the text string which is to encoded)
- Call up the text string and have the text encoded
- Define the letters in the alphabet and numbers with the DoDit (dot) and DoDash (dash) expressions
- Define the pins HIGH and LOW for DoDit and DoDash
- Figure out how to add a delay between each character
After many frustrating hours of coding I had something, it wasn’t working yet but I knew it was something I could work on. At the moment it was a huge text wall but I had included comments all over the place so I wouldn’t get lost.
Credits go to Daniel Andrade at www.danielandrade.com for notifying me of the DoDot and DoDash expressions and how to use them correctly. I would’ve been stuck a long time without that piece of information.
I’ve got parts of the code on a few forums to see if any one can help me out any so I’ll have to wait to see what feedback I receive.
Bibliography
Morse code map:
http://www.cl.cam.ac.uk/~djg11/howcomputerswork/
Mentally I kind of have the coding fleshed out. From past experiences of programming in many languages I knew this much:
- Define the variables (dots, dashes, led pins and most importantly the text string which is to encoded)
- Call up the text string and have the text encoded
- Define the letters in the alphabet and numbers with the DoDit (dot) and DoDash (dash) expressions
- Define the pins HIGH and LOW for DoDit and DoDash
- Figure out how to add a delay between each character
After many frustrating hours of coding I had something, it wasn’t working yet but I knew it was something I could work on. At the moment it was a huge text wall but I had included comments all over the place so I wouldn’t get lost.
Credits go to Daniel Andrade at www.danielandrade.com for notifying me of the DoDot and DoDash expressions and how to use them correctly. I would’ve been stuck a long time without that piece of information.
I’ve got parts of the code on a few forums to see if any one can help me out any so I’ll have to wait to see what feedback I receive.
Bibliography
Morse code map:
http://www.cl.cam.ac.uk/~djg11/howcomputerswork/
No comments:
Post a Comment