Electronic medicine dispenser