The version encoded here is a six element encoding to include some punctuation characters. If you're interested I can post the code the generates the 'a_decode' table based on the 'morse' table which would allow you to add or remove the morse characters you wish to allow. Original thread: morse decoder problem - #9 by nickgammon - Programming Questions - Arduino ForumĮxample of decoding a morse 'C' string using a lookup table. It auto-adjusts to the sending speed after a bit of time "learning" the length of a dot and dash. (millis () - lastPulse) >= (dotLength * 2) & If (pinState = HIGH & width >= (wordLength - FUZZ_FACTOR)) If (pinState = HIGH & width >= (dashLength - FUZZ_FACTOR)) Volatile unsigned int widths īyte pinState = digitalRead (SIGNAL_PIN) Here it is from my sketches folder: // Morse code decoderĬonst int SIGNAL_COUNT = 6 // maximum number of dots/dashes in a letter I seem to remember writing a decoder a while back.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |