WP40 on the ATO PWM & Custom code
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.