Page 1 of 1

Parabola reversed, possible ?

Posted: Wed Jan 22, 2014 4:39 pm
by lmolenmaker
Hi guys,

as far as I understand, the pwm parabola function ramps up and then down.

Is it possible to let the function first ramp down and then up?

For example this:

ReefAngel.PWM.SetDaylight( PWMParabola(10,0,22,0,60,0,0) );

Starting at 60% and then down to 0% and then up to 60% again ?

I just don't want to mess up my unit by uploading the above, hence my question.

Thanks in advance.

Leslie

Re: Parabola reversed, possible ?

Posted: Wed Jan 22, 2014 5:38 pm
by lnevo
Just do Max-Parabola(...)

So if your max is 60 when the parabola starts at 60 it will be 60-60 so 0 and when its at 0 it will be 60-0 so 0.

Re: Parabola reversed, possible ?

Posted: Wed Jan 22, 2014 7:16 pm
by lmolenmaker
Thanks for your answer Lee,

But I have no idea what to do with it.

What will be the code for the example below?

Starting at 60% and then down to 0% and then up to 60% again ? (pwm daylight channel, between 10.00 and 22.00 hrs).

I appreciate your help.

Leslie

Re: Parabola reversed, possible ?

Posted: Wed Jan 22, 2014 8:48 pm
by lnevo
ReefAngel.PWM.SetDaylight( 60 - PWMParabola(10,0,22,0,0,60,0) );

Re: Parabola reversed, possible ?

Posted: Wed Jan 22, 2014 9:26 pm
by lmolenmaker
Thanks Lee,

I will give it a try. I will report back later.

Leslie