Disclosed is a pump-less light-based biomedical apparatus and method for dispensing drug formulations and compounds to simulate the operation of a human pancreas without the drawbacks of an electromechanical pump-based design. Drug formulations dispensable by the method contain at least one photoswitchable molecular switch compound (such as azobenzene) whose structure and amounts of dosage released are controllable by light wavelength and intensity. Drug formulations are dispensed based on light generated by a set of LED arrays that includes blue LED's as directed by a closed-loop feedback control system within a control computer. The control system monitors multiple sensors, including a continuous blood glucose monitoring sensor, and performs control-system calculations based on sensor inputs. When necessary, the control system activates the LED arrays to cause the photoswitchable molecular switch compounds to be individually and selectively released in controlled amounts without the LED wavelengths interfering with each other.