Answer
In 1831, Joseph Henry invented an electromagnet, which is a precursor to the electric doorbell. An electromagnet is a type of magnet that is created by passing an electric current through a coil of wire. The magnetic field created by the current can be turned on and off by turning the current on and off.