All the code for the medicine dispenser