Parabola reversed, possible ?

Do you have a question on how to do something.
Ask in here.
Post Reply
lmolenmaker
Posts: 59
Joined: Tue Nov 12, 2013 5:58 am

Parabola reversed, possible ?

Post 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
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Parabola reversed, possible ?

Post 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.
lmolenmaker
Posts: 59
Joined: Tue Nov 12, 2013 5:58 am

Re: Parabola reversed, possible ?

Post 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
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Parabola reversed, possible ?

Post by lnevo »

ReefAngel.PWM.SetDaylight( 60 - PWMParabola(10,0,22,0,0,60,0) );
lmolenmaker
Posts: 59
Joined: Tue Nov 12, 2013 5:58 am

Re: Parabola reversed, possible ?

Post by lmolenmaker »

Thanks Lee,

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

Leslie
Post Reply