I wrote this code for an Arduino UNO microcontroller when I attended an Arduino course while doing my PhD in Biochemistry.
This was my project work at the end of the course.
I chose this topic because I have some flowers and I thought maybe I can even use this setup to water my plants (with some modifications).
The setup includes a servomotor that bends a straw inserted into a bottlecap.
Basically I created this setup to provide automatic watering but I also put a switch on the microcontroller by which we can manually water.