Python Forum
Morse Code Practice Script
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Morse Code Practice Script
#1
I created this script for myself which I thought I would share for those interested in learning or improving their Morse Code skills. I have not included all possible tests, but if you follow the menu items, 1 than 2 than 3, you should be o.k. The script will create a group of 5 random characters per word depending on the file type selected. The number of 'words' is determined by line 45, in this case it is set for 10 words, though for myself, I set it for 500 or (range(2500)).

The 'Words per minute' (wpm) are based on the formula from the ARRL (American Radio Relay League) site located here:
http://www.arrl.org/files/file/Technology/x9004008.pdf.

I suggest not going above 70 wpm because, at least for my sound system, it becomes to distorted.

As for the frequency, I would suggest starting with 400 and adjusting from there to suit your tastes. This value must be given in Hertz.

The file 'code_file.txt' will be created in the working directory.

One final note, although I've included all characters in the standard Morse Code, there is one that I had to skip and that is the single 'close quote' or back slant quote. There is no equivalent on the keyboard, so I tried to use the Unicode equivalent, but this raises an error I can't figure out how to correct (see line 98).

EDIT: The error has been corrected in the included code posted here

Lastly, if you don't want to see the answer printed on screen, comment out line 168.

As always any comments, critisisms, improvements are appreciated.

Enjoy.

If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply


Messages In This Thread
Morse Code Practice Script - by sparkz_alot - Jan-18-2018, 03:56 PM
RE: Morse Code Practice Script - by Larz60+ - Jan-18-2018, 04:31 PM
RE: Morse Code Practice Script - by Skaperen - Jan-24-2018, 04:46 AM
RE: Morse Code Practice Script - by Larz60+ - Jan-24-2018, 10:38 AM
RE: Morse Code Practice Script - by league55 - Jan-24-2018, 10:46 AM
RE: Morse Code Practice Script - by sparkz_alot - Jan-24-2018, 02:24 PM
RE: Morse Code Practice Script - by Larz60+ - Jan-24-2018, 06:05 PM
RE: Morse Code Practice Script - by league55 - Jan-24-2018, 11:13 PM
RE: Morse Code Practice Script - by Skaperen - Jan-25-2018, 05:43 AM
RE: Morse Code Practice Script - by sparkz_alot - Jan-31-2018, 04:00 PM
RE: Morse Code Practice Script - by Skaperen - Feb-01-2018, 03:24 AM
RE: Morse Code Practice Script - by sparkz_alot - Feb-01-2018, 02:06 PM
RE: Morse Code Practice Script - by sparkz_alot - Feb-04-2018, 03:47 PM
RE: Morse Code Practice Script - by Skaperen - Feb-06-2018, 03:41 AM
RE: Morse Code Practice Script - by sparkz_alot - Feb-06-2018, 02:03 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Best Practice to Pass a Variable Between Two Classes? MIPython 9 5,395 Apr-11-2018, 05:35 PM
Last Post: MIPython

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020