Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
|
|
@ -1,58 +1,58 @@
|
|||
Module Morse_code {
|
||||
declare Json JsonObject
|
||||
json$={{
|
||||
"!": "---.", "\"": ".-..-.", "$": "...-..-", "'": ".----.",
|
||||
"(": "-.--.", ")": "-.--.-", "+": ".-.-.", ",": "--..--",
|
||||
"-": "-....-", ".": ".-.-.-", "/": "-..-.",
|
||||
"0": "-----", "1": ".----", "2": "..---", "3": "...--",
|
||||
"4": "....-", "5": ".....", "6": "-....", "7": "--...",
|
||||
"8": "---..", "9": "----.",
|
||||
":": "---...", ";": "-.-.-.", "=": "-...-", "?": "..--..",
|
||||
"@": ".--.-.",
|
||||
"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": "--..",
|
||||
"[": "-.--.", "]": "-.--.-", "_": "..--.-",
|
||||
}}
|
||||
e = 50 ' Element time in ms. one dit is on for e then off for e
|
||||
f = 1280 ' Tone freq. in hertz
|
||||
chargap = 1*e ' Time between characters of a word
|
||||
wordgap = 7*e ' Time between words
|
||||
|
||||
method json, "parser", json$ as json
|
||||
with json, "itempath" as json.path$()
|
||||
|
||||
|
||||
Input "Send Message:";a$
|
||||
a$=trim$(a$)
|
||||
if len(a$)=0 then exit
|
||||
a$=ucase$(a$)
|
||||
|
||||
for i=1 to len(a$)
|
||||
L$=mid$(a$, i, 1)
|
||||
Print L$;
|
||||
Send(json.path$(L$))
|
||||
next
|
||||
|
||||
sub Send(a$)
|
||||
if len(a$)=0 then wait wordgap : exit sub
|
||||
local i
|
||||
for i=1 to len(a$)
|
||||
select case mid$(a$, i, 1)
|
||||
case "."
|
||||
tone e, f
|
||||
case "-"
|
||||
tone 3*e, f
|
||||
case else
|
||||
tone 3*e, f mod 2
|
||||
end select
|
||||
wait chargap
|
||||
next
|
||||
end sub
|
||||
declare Json JsonObject
|
||||
json$={{
|
||||
"!": "---.", "\"": ".-..-.", "$": "...-..-", "'": ".----.",
|
||||
"(": "-.--.", ")": "-.--.-", "+": ".-.-.", ",": "--..--",
|
||||
"-": "-....-", ".": ".-.-.-", "/": "-..-.",
|
||||
"0": "-----", "1": ".----", "2": "..---", "3": "...--",
|
||||
"4": "....-", "5": ".....", "6": "-....", "7": "--...",
|
||||
"8": "---..", "9": "----.",
|
||||
":": "---...", ";": "-.-.-.", "=": "-...-", "?": "..--..",
|
||||
"@": ".--.-.",
|
||||
"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": "--..",
|
||||
"[": "-.--.", "]": "-.--.-", "_": "..--.-",
|
||||
}}
|
||||
e = 50 ' Element time in ms. one dit is on for e then off for e
|
||||
f = 1280 ' Tone freq. in hertz
|
||||
chargap = 1*e ' Time between characters of a word
|
||||
wordgap = 7*e ' Time between words
|
||||
|
||||
method json, "parser", json$ as json
|
||||
with json, "itempath" as json.path$()
|
||||
|
||||
|
||||
Input "Send Message:";a$
|
||||
a$=trim$(a$)
|
||||
if len(a$)=0 then exit
|
||||
a$=ucase$(a$)
|
||||
|
||||
for i=1 to len(a$)
|
||||
L$=mid$(a$, i, 1)
|
||||
Print L$;
|
||||
Send(json.path$(L$))
|
||||
next
|
||||
|
||||
sub Send(a$)
|
||||
if len(a$)=0 then wait wordgap : exit sub
|
||||
local i
|
||||
for i=1 to len(a$)
|
||||
select case mid$(a$, i, 1)
|
||||
case "."
|
||||
tone e, f
|
||||
case "-"
|
||||
tone 3*e, f
|
||||
case else
|
||||
tone 3*e, f mod 2
|
||||
end select
|
||||
wait chargap
|
||||
next
|
||||
end sub
|
||||
}
|
||||
Keyboard "This is Morse_code", 13
|
||||
Morse_code
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue