4th doser

Do you have a question on how to do something.
Ask in here.
Post Reply
AlanM
Posts: 263
Joined: Wed Jan 01, 2014 7:26 am

4th doser

Post by AlanM »

What's the best way to code a 4th doser?

I assume this will work to have it come on 4 times during the day and run for 1 minute each time, but it's a little inflexible.

Code: Select all

  if (((hour() == 10) || (hour() == 14) || (hour() == 18) || (hour() == 22)) && (minute() < 1)) { // run autofeeder for 1 minute at 10,2,6,10
    ReefAngel.Relay.On(Box1_Port5);         
  } else {                             
    ReefAngel.Relay.Off(Box1_Port5);
  }
I'd probably take out the fixed hours and time and find an unused internal memory location to stick the values in, but this is a standing for now.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: 4th doser

Post by rimai »

I would go with something like this:

Code: Select all

ReefAngel.Relay.Set(Port1,now()%3600<5);
Roberto.
AlanM
Posts: 263
Joined: Wed Jan 01, 2014 7:26 am

Re: 4th doser

Post by AlanM »

Clever. I like it. Thanks!
Reefology
Posts: 237
Joined: Fri Dec 26, 2014 6:38 pm

Re: 4th doser

Post by Reefology »

could this work?

ReefAngel.DosingPumpRepeat( Port1,0,360,60 );

when these were already running:

ReefAngel.DosingPumpRepeat1( Port6 );
ReefAngel.DosingPumpRepeat2( Port7 );
ReefAngel.DosingPumpRepeat3( Port8 );
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: 4th doser

Post by rimai »

It should work.
Roberto.
Post Reply