Samuel F.B. Morse was honoured with patent 1647 for his invention of the Morse Code. Albert Vail was working alongside.
This was way back on June 20, 1840.
"What had God wrought" was the first line of Morse code to be delivered in 1844 along the telegraph line which spanned from Baltimore to Washington.
The patent title stated that the invention was meant for "the improvement in the mode of communicating information by signals by the application of electro-magnetism.
The electric telegraph message was based on rhythmic pulses, or sounds which are heard or recorded has dots and dashes. Initially the impulses generated were imprinted on a paper rolling along a clockwork type apparatus but soon it became apparent that the paper imprint was not necessarily required and the simple ability of recognizing the sound sequences of dits and dahs could be enough to note the incoming message.
Patent 1647 gained a massive commercial following. In aviation it became mandatory to learn coding in the Morse language in order to be a pilot.
Until the late 1800's the Morse invention was adapted to radio communication. During WW II the J 38 model came into existance as an innovation on the original Patent 1647 and this same model remains commercially available to this day.
The modern standard morse code is called continental code and was created in 1848 by Friedrich Clemens Gerke. The International Telegraphy congress of 1865 held in Paris chose this form of impulses over the Morse/Vail type and it became the International Morse Code while the original code held the title of American Morse Code or "railroad code".