Self-organizing spiral electrical waves are produced in the heart during fatal cardiac arrhythmias. Controlling these waves is therefore an essential step in managing the disease. Here we present an effective method for controlling cardiac spiral waves using optogenetics. The method involves using photons to actively scan the surface of the heart for phase singularities. Once detected, these phase singularities are redirected to an inexcitable wall to be eliminated. Thus, spiral waves can be controlled in a double-blind fashion. We present two theoretical mechanisms with ex vivo validation.