ScratchData LogoScratchData
Back to grandpasp's profile

Morse code

GRgrandpasp•Created November 18, 2024
Morse code
10
6
58 views
View on Scratch

Instructions

This project has two modes: Text-to-Morse-Code: Select [SOS] -> ... --- ... (top left) Enter a string of characters and hear them encoded as a series of 800hz dits and dahs. Morse-Code-to-Text: Select ... -- ... -> [SOS] (top right) Click you mouse to try your hand at generating Morse Code. (Tip: Don't make the "dashes" too short)

Description

Credit to @crkcity for the inspiration. Basic Morse code encodes the 26 basic Latin letters A to Z. (International Morse code also encodes one accented Latin letter (É) and a small set of punctuation and procedural signals, but this project does not.) There is no distinction between upper and lower case letters. Each Morse code symbol is formed by a sequence of dits and dahs (or, commonly called dots and dashes). The dit duration can vary for signal clarity and operator skill (I'm using 0.1 secs in this project), but for any one message, once established it is the basic unit of time measurement in Morse code. The duration of a dah is three times the duration of a dit (although some telegraphers deliberately exaggerate the length of a dah for clearer signalling). Each dit or dah within an encoded character is followed by a period of signal absence, called a space, equal to the dit duration. The letters of a word are separated by a space of duration equal to three dits, and words are separated by a space equal to seven dits. Coding difficulties encountered: 1) Coercing the "play sound" block to run consistantly. 2) Trapping a mouse-down event in a timely manner to trigger the start of the tone. 3) Accurately timing the mouse-down/mouse-up events.

Project Details

Project ID1097945391
CreatedNovember 18, 2024
Last ModifiedNovember 20, 2024
SharedNovember 19, 2024
Visibilityvisible
CommentsAllowed

Remix Information

Parent ProjectView Parent
Root ProjectView Root