An electronic pill dispenser includes a container and a cap removably attached to the container. Components of the pill dispenser include a power source, pill dispenser circuitry, a real time clock, a counter, a display, a dispensing mechanism, a sensor, a visual indicator, an audible indicator, an input / output interface, an input output port, and a communication bus electrically interconnecting the components. The pill dispenser may also include a physical indicator, a locking mechanism, a transceiver, an antenna, and a modem. The pill dispenser enhances patient compliance for following through a particular drug regimen by offsetting negative effects of memory loss and other cognitive dysfunctions, attenuation of special senses, poor eyesight, lack of patient education, etc. The pill dispenser also helps the mentally unstable. The pill dispenser reminds users and dispenses pills to authorized individuals at appropriate times, and is economical and convenient.