Who invited the telegraph

The invention of the telegraph is credited to Samuel Morse and Alfred Vail. They first publicly demonstrated the telegraph on May 24, 1844, in Washington, D.C. However, the idea of using electrical signals for long-distance communication can be traced back to earlier inventors like Sir William Fothergill Cooke and Charles Wheatstone.