I have been searching for examples of this, but have found none so I figured I'd ask. I am trying to program an 8-hour batch process that will read a sensor to adjust the time to turn on relays each hour for the first 5 hours, then will wait 3 hours and take measurements and ultimately flip two more relays.
I found the TimeAlarm library on the forum, but that only handles 6 alarms and I have more events than that. Also, when an event happens, for instance a relay turns on, I read a sensor, then average the sensor and record that to an SD card, so there are many events tied to each action.
I thought of doing a series of if/then statements, where the if statement is about the time on the clock, where the hour is divided by 3 so as to repeat every 8 hours. Example if hour = 2, turn on relay for 5 min, record sensor, etc. The question is that if I go this route, is there any chance of a relay hanging?
Any advice would be helpful.
Thanks in advance!