PWMParabola

Basic / Standard Reef Angel hardware
Post Reply
User avatar
DrewPalmer04
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL

PWMParabola

Post by DrewPalmer04 »

Is it possible to use the PWMParabola or PWMSlope for pinMode(lowATOPin,OUTPUT); ? This would be for use for the idea of controlling a meanwell P series driver from 0-5v from the lowATOPin.
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: PWMParabola

Post by rimai »

Yes, you can do this:

Code: Select all

analogWrite(lowATOPin,2.55*PWMSlope(7,0,19,0,0,100,60,0));
PWMSlope or PWMParabola returns a value between 0 and 100%.
So, you just need to multiply by 2.55 before passing on to the analogWrite function.
Roberto.
User avatar
DrewPalmer04
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL

Re: PWMParabola

Post by DrewPalmer04 »

Any way to display the % for the output for this on a custom main?
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: PWMParabola

Post by rimai »

Yeah, you can just draw the same thing:

Code: Select all

ReefAngel.LCD.Drawtext(0,255,10,10,PWMSlope(7,0,19,0,0,100,60,0));
Roberto.
Post Reply