Hello,
I'm making an Arduino controlled sprinkler system using an ethernet shield so that it can be controlled through the web. I'm working on the schedule and wonder if there is a way to use the timeAlarms library in a way so that the user can change the dates/times of the alarms? What I have in mind is to create a number of functions such as:
And the user will have input boxes for each zone to change the time, date, etc. However, from what I understand the alarmRepeat function is supposed to be called in the setup(), not from the loop(), so would this even be possible?
However, from what I understand the alarmRepeat function is supposed to be called in the setup(), not from the loop(), so would this even be possible?
The alarmRepeat() method is typically called from setup(). This is so that it is not called on every pass through loop(). However, if the time to have the alarm go off changes, because of user input, there is no reason not to call alarmRepeat() from loop(), once in a while.
PaulS:
The alarmRepeat() method is typically called from setup(). This is so that it is not called on every pass through loop(). However, if the time to have the alarm go off changes, because of user input, there is no reason not to call alarmRepeat() from loop(), once in a while.
Once in a while...so 8 times (one for each sprinkler zone) probably wouldn't be the best idea?
Would it work to create global variables such as h1, h2, h3 etc. for hours and m1, m2, m3 etc. for minutes, call the alarmRepeat() function in setup(), and have the user change the variables in loop()? Or would I need to call the alarmRepeat() functions in loop() for this to work?