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!
Timing - Seconds
Re: Timing - Seconds
Yes.
This line would turn Port1 every 28800 secs (3 times per day) for 15 seconds
Code: Select all
ReefAngel.DosingPumpRepeat(Port1,0,28800,15);
Roberto.
- stevenhman
- Posts: 23
- Joined: Sat Jan 14, 2012 4:57 pm
Re: Timing - Seconds
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
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:
We can always code a specific function if the 3 times/day can't be changed.
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);
Roberto.
- stevenhman
- Posts: 23
- Joined: Sat Jan 14, 2012 4:57 pm
Re: Timing - Seconds
Hmm.
So...
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.
So...
Code: Select all
ReefAngel.DosingPumpRepeat(Port1,255,14400,8);
I am not sure what you mean by specific function.
Re: Timing - Seconds
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.

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.
Roberto.
- stevenhman
- Posts: 23
- Joined: Sat Jan 14, 2012 4:57 pm
Re: Timing - Seconds
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.
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.