You're probably already familiar with Samuel Morse's work, thanks to a bunch of dots and dashes. Morse invented his namesake code, a way to communicate using only sounds or flashes of light, in the 1830s and '40s. He also improved upon telegraph technology, sending the first telegraph message on May 24, 1844. While his innovative improvements would go on to benefit many, they arrived too late to help the man himself.

Before Morse was known for his inventions, he was making a living as a professional painter. After graduating from Yale in 1810, Morse moved to London to study at the Royal Academy of Arts. His painting Dying Hercules, a 8-foot by 6.5-foot oil on canvas, received some critical acclaim, and when he returned to the United States, he made a name for himself painting some big names in American politics: John Adams and James Monroe, among others.

In February 1825, Morse was in Washington to paint a portrait of the Marquis de Lafayette when he received a letter from his father. His wife, Lucretia, had fallen gravely ill less than a month after giving birth to their third child. Morse immediately packed up his paint and headed home to New Haven, but by the time he made it home, he was too late—Lucretia had died, and, in fact, had already been buried for several days. “You cannot know the depth of the wound that was inflicted when I was deprived of your dear mother, nor in how many ways that wound has been kept open,” he later wrote to his daughter, Susan. But without Morse’s wound, the telegraph as we knew it may never have existed—after his wife’s death, Morse vowed to figure out a way to deliver life-and-death messages in a timely manner.

Morse continued working on his art career for several years, but the vow was always in the back of his mind. Several years later, in 1832, Morse was on a ship back from Europe and met Charles Thomas Jackson, a Boston-based scientist who had developed an electromagnet. Morse became convinced that he could use the concept to transmit messages, and, of course, he was right. (Jackson later sued him for stealing the idea.) After plenty of tinkering, testing, and demonstrations, history was made in 1844 when Morse telegraphed a Bible quote from Washington, D.C., to Baltimore: “What hath God wrought?”

Morse’s stint as a painter also left a lasting impression. In 1982, his Gallery of the Louvre painting was purchased for $3.25 million. At the time, it was the highest price paid for a work by an American artist. It sold for just $1300 in 1832—$1200 below Morse’s asking price.