I think some there are some problems in the tasks.
To implement pid or any kind of controller you need to have feedbacks . i.e. you need to stabilize the liquid in the glass. so you need to let the arduino know how much distabilized is the liquid is at any given moment. There is no such feedback system in this project as far as i see!