Inventor and painter who co-developed one of the first practical electrical telegraphs and created Morse code, fundamentally changing long-distance communication.