WP40 on the ATO PWM & Custom code
Re: WP40 on the ATO PWM & Custom code
this is awesome thread,
that helps me a lot to understand and use it.
thanks much guys
that helps me a lot to understand and use it.
thanks much guys
Re: WP40 on the ATO PWM & Custom code
is there a way to check if this is working? if the speed is ramping up and down? will the portal ato low level change colors when running this?
Also,
How would I change this code for a pump connected to the ATO port?
Thanks
Also,
How would I change this code for a pump connected to the ATO port?
Code: Select all
static time_t StartFeeding=0;
if (ReefAngel.DisplayedMenu==FEEDING_MODE)
StartFeeding=now(); // if we entered feeding mode, register what time it was.
if (now()-StartFeeding > 1800 && now()-StartFeeding < 5400) // if feeding started between 1800 and 5400 seconds
ReefAngel.PWM.SetActinic(100);
else
ReefAngel.PWM.SetActinic(45);
Re: WP40 on the ATO PWM & Custom code
any input on the above?
Thanks
Thanks
Re: WP40 on the ATO PWM & Custom code
The code you posted is for feeding mode.
Not sure what you are asking.
The way to test is load into the controller and check your pump.
Not sure what you are asking.
The way to test is load into the controller and check your pump.
Roberto.
Re: WP40 on the ATO PWM & Custom code
( PWMParabola(3,0,2,59,30,75,0), PWMParabola(3,0,2,59,12,25,0),true) );
Hi can anyone explain what the number means so i can alter to my preference?
Thanks
Hi can anyone explain what the number means so i can alter to my preference?
Thanks
Re: WP40 on the ATO PWM & Custom code
Roberto,rimai wrote:The code you posted is for feeding mode.
Not sure what you are asking.
The way to test is load into the controller and check your pump.
Sorry if I was not clear. This code controls a pump that run a 45% all the time, and at 100% for one hour starting 30min after triggering feed mode.
My question is how do I modify this code to do this for a pump controlled through the ATO port instead of the Actinic port as shown in the code.
Code: Select all
static time_t StartFeeding=0;
if (ReefAngel.DisplayedMenu==FEEDING_MODE)
StartFeeding=now(); // if we entered feeding mode, register what time it was.
if (now()-StartFeeding > 1800 && now()-StartFeeding < 5400) // if feeding started between 1800 and 5400 seconds
ReefAngel.PWM.SetActinic(100);
else
ReefAngel.PWM.SetActinic(45);
Re: WP40 on the ATO PWM & Custom code
It's in the OP.
Use something like this to set the ATO port to what you want:
The example above sets it to 45%
Use something like this to set the ATO port to what you want:
Code: Select all
pinMode(lowATOPin,OUTPUT);
analogWrite(lowATOPin,45*2.55);
Roberto.
Re: WP40 on the ATO PWM & Custom code
Check here:Amos Poh wrote:( PWMParabola(3,0,2,59,30,75,0), PWMParabola(3,0,2,59,12,25,0),true) );
Hi can anyone explain what the number means so i can alter to my preference?
Thanks
http://www.easte.net/RA/html/_globals_8 ... de5873f8d6
Roberto.
Re: WP40 on the ATO PWM & Custom code
Roberto,rimai wrote:It's in the OP.
Use something like this to set the ATO port to what you want:The example above sets it to 45%Code: Select all
pinMode(lowATOPin,OUTPUT); analogWrite(lowATOPin,45*2.55);
Does this
Code: Select all
pinMode(lowATOPin,OUTPUT);
The xxxxxxx are other lines in the code
Code: Select all
xxxxxxxx
xxxxxxx
pinMode(lowATOPin,OUTPUT)
xxxxxxxx
xxxxxxxx
if (ReefAngel.DisplayedMenu==FEEDING_MODE)
StartFeeding=now(); // if we entered feeding mode, register what time it was.
if (now()-StartFeeding > 1800 && now()-StartFeeding < 5400) // if feeding started between 1800 and 5400 seconds
analogWrite(lowATOPin,100*2.55);
else
analogWrite(lowATOPin,75*2.55);
Re: WP40 on the ATO PWM & Custom code
I'm pretty sure it only needs to be done once.
Re: WP40 on the ATO PWM & Custom code
I think you can do once, but just in case keep it everytime you use digitalWrite, just because the ATO port is setup as input and not as output.
Roberto.
Re: WP40 on the ATO PWM & Custom code
Roberto wonder if that may be the problem for the person who had issue in feeding/wc mode with the lowAto.
Re: WP40 on the ATO PWM & Custom code
Well I tried this
and got an error on "else" - it says "there is not an if" before
so I just changed it to this, and it's working fine
Code: Select all
if (ReefAngel.DisplayedMenu==FEEDING_MODE)
StartFeeding=now(); // if we entered feeding mode, register what time it was.
if (now()-StartFeeding > 1800 && now()-StartFeeding < 5400) // if feeding started between 1800 and 5400 seconds
pinMode(lowATOPin,OUTPUT)
analogWrite(lowATOPin,100*2.55);
else
pinMode(lowATOPin,OUTPUT)
analogWrite(lowATOPin,75*2.55);
so I just changed it to this, and it's working fine
Code: Select all
....
ReefAngel.StandardLights( Port1,14,0,19,0 );
ReefAngel.StandardLights( Port2,15,0,20,0 );
ReefAngel.StandardLights( Port3,19,55,22,0 );
ReefAngel.StandardLights( Port4,14,0,20,15 );
ReefAngel.StandardHeater( Port5,780,785 );
ReefAngel.StandardFan( Port6,780,800 );
ReefAngel.StandardLights( Box1_Port5,22,0,16,0 );
ReefAngel.DCPump.UseMemory = true;
pinMode(lowATOPin,OUTPUT);
....
static time_t StartFeeding=0;
if (ReefAngel.DisplayedMenu==FEEDING_MODE)
StartFeeding=now(); // if we entered feeding mode, register what time it was.
if (now()-StartFeeding > 1800 && now()-StartFeeding < 5400) // if feeding started between 1800 and 5400 seconds
analogWrite(lowATOPin,100*2.55);
else
analogWrite(lowATOPin,60*2.55);
....
Re: WP40 on the ATO PWM & Custom code
What's the difference between the regular cables and the ATO cable for jebao?
Re: WP40 on the ATO PWM & Custom code
You have to remove a resistor (surface mount) on the cable for it to work properly with the 5V ATO signal. There's a thread around here somewhere that points it out.
--Colin
--Colin
Re: WP40 on the ATO PWM & Custom code
Thanks, found it.