A pacemaker is a small device that is implanted under the skin to help regulate an irregular or slow heartbeat. It senses the heart's rhythm and sends electrical signals to keep it beating at a normal pace. The first attempts to treat irregular heartbeats with electric shocks occurred in 1788. The first fully implantable pacemaker was developed in 1958. Modern pacemakers have leads that carry electrical signals from the generator to the heart and can adapt pacing to meet metabolic demands. Future technologies include pacemakers that are MRI-safe, have longer battery life, and can be monitored wirelessly.