Electrical switch has been independently invented by Samuel Morse and William Fardella. The basis was the U-shaped magnet. Metal plate, attached to a spring in front of the poles of the electromagnet, is pulled to it when the current is switched on. When it is switched off, it returns back to the spring. This alternating two-way movement was used for switching the electrical contact positioned on the plate.