Controlling chaotic dynamics in excitable media is key for terminating cardiac fibrillation. With each heartbeat, electrical excitation waves propagate across the heart muscle, leading to coordinated mechanical contraction and efficient pumping. During cardiac fibrillation, however, excitation waves are chaotic, resulting in incoherent contraction and loss of mechanical function. In clinics, for lack of a better strategy, high-energy electric shocks are being used to terminate arrhythmia and restore normal function. However, these shocks have severe side effects, including tissue damage, excruciating pain, and a worsening prognosis.