Diabetes is a worldwide problem affecting more than 400 million people worldwide, costing healthcare systems billions of dollars a year. When a patient’s pancreas stops producing insulin, blood sugar levels are not controlled and can vary wildly, leading to all sorts of secondary complications, including death.

Researchers have created “optogenetic” cells that produce insulin when exposed to light. By implanting an LED disc as a source of illumination, the scientists were able to control a diabetic mouse’s blood sugar levels using a smartphone app that communicated wirelessly to turn the light on and off as needed. The system could be tied to a constant glucometer to provide a closed-circuit feedback loop to control blood glucose levels automatically.

This is still an early-stage research project, but it points to a future where insulin delivery — and possibly other chemicals — can be delivered automatically using implanted cells that are supported by the body’s natural functions, instead of mechanical devices such as pumps or patches. The result could be a bionic solution to chronic diseases and conditions.