[VicPiMakers Projects] Challenge 7
James Briante
briantej at gmail.com
Sun Jan 30 21:02:47 PST 2022
Please find attached two documents describing Challenge 7 that were briefly
described in our last meeting.
Let me know if you have any questions or require components.
Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://vicpimakers.ca/pipermail/projects_vicpimakers.ca/attachments/20220130/d5bbfc75/attachment.htm>
-------------- next part --------------
Morse Code Ecoding Using Python Dictionary Definition:
MorseCode= {"A":".-", "B": "-...", "C": "-.-.", "D": "-..", "E": ".", "F": "..-.",
"G": "--.", "H": "....","I": "..", "J": ".---", "K": "-.-", "L": ".-..",
"M": "--", "N": "-.", "O": "---", "P": ".--.","Q":"--.-", "R":".-.",
"S":"...", "T":"-", "U":"..-", "V":"...-", "W":".--", "X":"-..-",
"Y": "-.--", "Z": "--..", "1": ".----", "2": "..---", "3": "...--",
"4": "....-", "5": ".....","6":"-....","7": "--...", "8": "---..",
"9": "----.", "0": "-----", ".": ".-.-.-", "’": ".----.", " ": " "};
Morse Code Ecoding Using a String Array For C or Python:
const char* MorseCode[] ={".-", "-...", "-.-.","-..", ".", "..-.",
"--.","....","..",".---","-.-",".-..","--","-.",
"---",".--.","--.-",".-.","...","-","..-","...-",
".--","-..-","-.--","--..",".----","..---","...--",
"....-", ".....","-....","--...","---..","----.",
"-----"
};
const char *Ptext= "SOS";
............................................................................................
MorseCode[] is a constant array of Morse Code characters (dods & dashes) defined has strings.
MorseCode[0] is the string ".-", the Morse Code for A. The ASCII value of A is 65. Subtracting
65 from the ASCII value of A gives 0, the index of the first element of the array. The Morse codes
for each of the charters of Ptext = "SOS" can be obtained by subtracting 65 from their ASCII value.
However, if Ptext contains ASCII digits 0 to 9 their ASCII values must be translated to
produce an array index that follow the Z.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Challange 7 Ground Station Beacon.pdf
Type: application/pdf
Size: 136886 bytes
Desc: not available
URL: <http://vicpimakers.ca/pipermail/projects_vicpimakers.ca/attachments/20220130/d5bbfc75/attachment.pdf>
More information about the Projects
mailing list