I'll design the board and program the microcontroller for you, under one condition:
Once it's complete and working, you have to fill the dispenser with a bottle of each of the following: hydrocodone, lorazepam, carisoprodol, clonidine, diphenhydramine and amitriptyline.
Now, you have to test the dispenser by activating it and consuming what it dispenses until it's out of pills.
Did it work? Celebrate by drinking a fifth of vodka!
Let me know if you'd like to take me up on this.
Sent from my Smartphone