Digital closed-loop control of plasma glycemia