Coding doser for only one day a week?
Coding doser for only one day a week?
Is it possible to code the dosers to run once a week for 5 seconds with the second doser 5min later? I looked at the time library and saw there is a day of week with sunday being 1 although I don't know where to set it with the RA+ or how to access that to make it available in the time/date menu.
Re: Coding doser for only one day a week?
Come one man
If you even saw the function in the libraries, you know the answer to this!!!
Or another alternative:
Or a more complicated method:
The above method would dose at midnight instead of 8am though.
If you even saw the function in the libraries, you know the answer to this!!!
Code: Select all
if (weekday()==1 && hour()==8 && minute()==0&&second()<5)
ReefAngel.Relay.On(Port1);
else
ReefAngel.Relay.On(Port1);
Code: Select all
ReefAngel.Relay.Set(Port1,weekday()==1 && hour()==8 && minute()==0&&second()<5);
Code: Select all
ReefAngel.Relay.Set(Port1,now()%SECS_PER_WEEK<5);
Roberto.
Re: Coding doser for only one day a week?
Thanks ramai, I did see the function although i'm not sure if the rtc is set correctly to the current day. I guess it really doesnt matter since it'll just be done once a week. But thanks for the code structure help.