Page 1 of 1

Re: Adjust dosing pumps with app?

Posted: Wed Jun 01, 2016 5:17 pm
by lnevo
void Channel0PWMSlope(int MinuteOffset);
void Channel1PWMSlope(int MinuteOffset);
void Channel2PWMSlope(int MinuteOffset);
void Channel3PWMSlope(int MinuteOffset);
void Channel4PWMSlope(int MinuteOffset);
void Channel5PWMSlope(int MinuteOffset);
void Channel0PWMSlope(int PreMinuteOffset, int PostMinuteOffset);
void Channel1PWMSlope(int PreMinuteOffset, int PostMinuteOffset);
void Channel2PWMSlope(int PreMinuteOffset, int PostMinuteOffset);
void Channel3PWMSlope(int PreMinuteOffset, int PostMinuteOffset);
void Channel4PWMSlope(int PreMinuteOffset, int PostMinuteOffset);
void Channel5PWMSlope(int PreMinuteOffset, int PostMinuteOffset);

Those are the functions we have for Slope on the PWM Dimming expansion. It means you could just change what you have for Channel 0 to just the following

ReefAngel.PWM.Channel0PWMSlope();

Now since you have an offset, the default behavior is like the actinic offset which will start the lights early and end them later. Since you're just shifting your start time and end time to match you would do the following channels

ReefAngel.PWM.Channel1PWMSlope(-5,5);
ReefAngel.PWM.Channel2PWMSlope(-10,10);
ReefAngel.PWM.Channel3PWMSlope(-15,15);
ReefAngel.PWM.Channel4PWMSlope(-20,20);
ReefAngel.PWM.Channel5PWMSlope(-25,25);

Re: Adjust dosing pumps with app?

Posted: Wed Jun 01, 2016 5:19 pm
by lnevo
jjdezek wrote:Ok do I just delete the numbers from the temp and ato?
Pretty much :)

If you look at the API search at http://www.easte.net/ra/html you'll find this when you search for StandardATO

ReefAngelClass::StandardATO(byte ATORelay, int ATOTimeout)
ReefAngelClass::StandardATO(byte Relay)

Which means we have one function that just needs the relay and one that needs the relay and the timeout. If you don't set things in the function call then it will usually get from memory :)

Re: Adjust dosing pumps with app?

Posted: Wed Jun 01, 2016 5:30 pm
by jjdezek
ReefAngel.PWM.SetChannel( 0, PWMSlope(8,0,20,0,5,55,180,5) );
ReefAngel.PWM.SetChannel( 1, PWMSlope(8,5,20,5,5,45,180,5) );
ReefAngel.PWM.SetChannel( 2, PWMSlope(8,10,20,10,5,55,180,5) );
ReefAngel.PWM.SetChannel( 3, PWMSlope(8,15,20,15,5,45,180,5) );
ReefAngel.PWM.SetChannel( 4, PWMSlope(8,20,20,20,5,55,180,5) );
ReefAngel.PWM.SetChannel( 5, PWMSlope(8,25,20,25,5,45,180,5) );
so for the light I would change the part in () to the -5,5 -10,10 and so on?

Re: Adjust dosing pumps with app?

Posted: Wed Jun 01, 2016 6:04 pm
by jjdezek
ok heres what I have changed. does this look right before I load it? also how do my light know when to turn on with this code? when I went into the internal memory and set the lights for the duration it only allowed me to set it at 60 mins. does this mean my lights will only be on for an hour? or is that how long there at the top %? I didn't mess with the ato because I wasn't sure what to put in the internal memory and im not worried about needing to adjust that.

ReefAngel.DosingPumpRepeat1( Port1);
ReefAngel.DosingPumpRepeat2( Port2);
ReefAngel.StandardATO( Port3,30 );
ReefAngel.StandardHeater( Port7);
ReefAngel.PWM.Channel0PWMSlope();
ReefAngel.PWM.Channel1PWMSlope(-5,5);
ReefAngel.PWM.Channel2PWMSlope(-10,10);
ReefAngel.PWM.Channel3PWMSlope(-15,15);
ReefAngel.PWM.Channel4PWMSlope(-20,20);
ReefAngel.PWM.Channel5PWMSlope(-25,25);

Re: Adjust dosing pumps with app?

Posted: Wed Jun 01, 2016 10:23 pm
by lnevo
You can change this one and set the timeout in the ATO section.

ReefAngel.StandardATO( Port3,30 );

to

ReefAngel.StandardATO( Port3 );

Re: Adjust dosing pumps with app?

Posted: Thu Jun 02, 2016 8:06 am
by jjdezek
What would I put in the internal memory for the ato?

Re: Adjust dosing pumps with app?

Posted: Thu Jun 02, 2016 9:41 am
by lnevo
30

Re: Adjust dosing pumps with app?

Posted: Thu Jun 02, 2016 2:44 pm
by jjdezek
Ok got the lights and dosing codes loaded going to see how they work before I mess with ato.

Re: Adjust dosing pumps with app?

Posted: Thu Jun 02, 2016 4:34 pm
by jjdezek
My lights aren't dimming down. Is there something I need to do to control when they ramp up and down?

Re: Adjust dosing pumps with app?

Posted: Thu Jun 02, 2016 6:41 pm
by lnevo
Is everything set in the portal / app? You also need to set the time schedule for 8:00-20:00

Re: Adjust dosing pumps with app?

Posted: Thu Jun 02, 2016 6:50 pm
by jjdezek
Yeah I found that after I posted. Changed it and everything seems to be working good. Thanks for all the help. Made my task easier.

Re: Adjust dosing pumps with app?

Posted: Fri Jun 03, 2016 9:49 am
by lnevo
Cool. This is a good thread. Gonna try and rename and pin it later. Great exercise to convert from hard coded config to memory based. Glad it worked out good for you.

Re: Adjust dosing pumps with app?

Posted: Fri Jun 03, 2016 11:30 am
by jjdezek
That works for me hopefully others can get some good info from this.