The key is harnessing "redox" molecules, which move electrons in biological systems through chemical reactions. Using an electrode connected to an electronic device, the researchers were able to flip the redox molecules between oxidized and reduced states, two of the study's co-authors wrote in Scientific American. By genetically modifying bacterial cells to respond to the redox molecule pyocyanin, the team could then control the bacteria's protein synthesis. And because the protein produced glows a fluorescent green, the team was about to watch as they flipped the cells on and off like a light switch.

In another example, the research team was able to create a bacteria that would swim forward when "switched on," but would remain in one spot when "off." And in a third example, the team was able to influence the collective behavior of an entire colony of cells. Moving forward, the researchers envision autonomous devices (or even just a feature of your smartphone) that could spot and treat diseases by reprogramming bacteria to produce helpful compounds and "issue new directions to the biological system."