I'm in the middle of doing a project which is an automatic watering system for a plant pot. I've got all of the circuits sorted but now that I'm onto the coding, im sort of confused...
So with the moisture sensor I've calibrated it so I know at what value the plant needs watering, at what value it is at maximum dryness and maximum wetness and at what value it should stop watering again (so that the soil isn't waterlogged).
The max dryness value is around 750 and wetness at 150.
The way I want it to work is for the code to keep checking wether the dryness gets to a value bigger than 400. If it is then I want it to start watering until it's reading a value of 200 then to stop watering and repeat the cycle.
I'm not sure how to code this but I'm sure there's a simple way of doing it.
Thanks in advance for your help!