Portable electronic devices that automatically diagnose life-threatening cardiac arrhythmias of ventricular fibrillation and pulseless ventricular tachycardia, and treat them through defibrillation, the application of electricity to stop the arrhythmia.