When was the Morse Code Invented?

In 1836 the painter and founder of the National Academy of Design made the first telegraph set. Samuel F. B Morse had first thought of the idea in 1832.