In 1837, an American artist devised a working electric telegraph, based on a rough knowledge of electrical circuits, electromagnetic induction coils, and a scheme to encode alphabetic letters.
Samuel F. B. Morse and his collaborators and backers campaigned for years before persuading the federal government to fund a demonstration. Finally, on May 24, 1844, they sent the first official long-distance telegraphic message in Morse code, "What hath God wrought," from Washington, D.C., to Baltimore, Maryland.