A pancreatic controller, comprising:a glucose sensor, for sensing a level of glucose or insulin in a body serumat least one electrode, for electrifying an insulin producing cell or group of cellsa power source for electrifying said electrode with a pulse that does not initiate an action potential in said cell and has an effect of increasing insulin secretion anda controller which receives the sensed level and controls said power source to electrify said electrode to have a desired effect on said level.