invented the it was a device that sent electrical signs along a wire. Eventually messages could be sent long distance using this device. The series of dots and dashes used became known as.

The device you are referring to is the telegraph, and the series of dots and dashes used to send messages is commonly known as Morse code.