Page 1 of 1
Timing - Seconds
Posted: Tue Jan 17, 2012 5:27 pm
by stevenhman
I'd like to run a misting pump (basically an RO booster pump) and I probably wouldn't need to run it for a minute at a time. I would like to be able to run it, maybe 15-30 seconds 3 times a day. Is the Reef Angel capable of this - and if so, how would I code it?
Thanks!
Re: Timing - Seconds
Posted: Tue Jan 17, 2012 6:23 pm
by rimai
Yes.
Code: Select all
ReefAngel.DosingPumpRepeat(Port1,0,28800,15);
This line would turn Port1 every 28800 secs (3 times per day) for 15 seconds
Re: Timing - Seconds
Posted: Tue Jan 17, 2012 7:01 pm
by stevenhman
Ahh. The more examples of coding I see, the less intimidating it becomes. Would you mind telling me what the "0" part of it means? If I wanted specific times (lets say 30 minutes after the lights come on) would I just have to figure it out from the 'on' value on whatever line of code the lights are based off of?
Re: Timing - Seconds
Posted: Tue Jan 17, 2012 7:24 pm
by rimai
This function uses number of seconds from midnight.
The 0 means the number of minutes you want to offset it from midnight.
So, you just need to calculate how many minutes from midnight your schedule has to be to make sure that it goes along with your lighting. There is a limitation though. The number of minutes can go as high as 255 minutes and not more.
3 times a day means every 8 hours.
The mist would kick in at 8am, 4pm and midnight.
Lets assume your lights go off at 9pm, you would not be able to use this function.
Now, if you increased the number of times to 4 times/day, then you would be able to acommodate that.
The mist would kick in at 6am, 12pm, 6pm and midnight.
Now, we can set the offset to 3.5 hours, which is 210 minutes and the function would be:
Code: Select all
ReefAngel.DosingPumpRepeat(Port1,210,21600,15);
We can always code a specific function if the 3 times/day can't be changed.
Re: Timing - Seconds
Posted: Tue Jan 17, 2012 8:53 pm
by stevenhman
Hmm.
So...
Code: Select all
ReefAngel.DosingPumpRepeat(Port1,255,14400,8);
Would be 4 hrs 15min after midnight (255), then 14400 seconds later (4 hours later), roughly 8:15am - the pump would run for 8 seconds, then every 4 hours after that? 12,16,20, 0 (?)
I am not sure what you mean by specific function.
Re: Timing - Seconds
Posted: Tue Jan 17, 2012 9:00 pm
by rimai
Yes, you got it

An specific function would be something that is not yet created. Something that would do exactly what you need, but if the function you wrote works for you, then we don't need anything else.
Just a quick note. This function will only work on the libraries v.0.9.0, which should be released very shortly.
Re: Timing - Seconds
Posted: Tue Jan 17, 2012 9:10 pm
by stevenhman
Awesome!
This would probably end up being better for running a dripwall.
A specific function sounds much better for the purpose of misting. My only real experience programming so far is the TI series calculators like 10 years ago... hahaha.
Funbrain
Posted: Wed Jan 18, 2012 7:44 am
by TraumummadymN
Wonderful web site. Lots of helpful info here. I am sending it to a few friends ans also sharing in delicious. And certainly, thanks for your effort!