I need help changing my current watering setup to water based on RTC. I am using a DS3231
Ideally I would like to use the RTC to set intervals to check current moisture levels and water as needed.
I would also like to put in a fail safe to water at a set time everyday regardless of moisture levels.
I have been working on what turned out to be a much more complex project than I should have ever attempted, but I have made progress. I am trying to work on an automated watering system. The sketch I have put together (mostly from copying other projects) currently displays the current time, temp, humidity, ph level. I have also had success in automating filling a reservoir (checks float switches and activates the solenoid) and have been playing with automating nutrient filling (that will require hours of fine tuning I imagine) It does currently work to read the moisture levels and to activate the watering pumps based on the hard coded moisture value, but in it’s current form basically keeps the plants watered at the same rate and does not allow for any dry time.
I have tried to use
if ((rtc.getTimeStr() >= “21:59:00”) && (rtc.getTimeStr() <= “21:59:59”))
{
Serial.println(“Woooopp”);
}
but it does not work. any help would be greatly appreciated. I will attach my crazy long and probably terribly coded sketch now for all to criticize. And please do, it will help me learn faster!
sketch49.ino (42 KB)