PWMParabola
- DrewPalmer04
- Posts: 818
- Joined: Tue May 29, 2012 2:12 pm
- Location: Christopher, IL
PWMParabola
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.
Re: PWMParabola
Yes, you can do this:
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.
Code: Select all
analogWrite(lowATOPin,2.55*PWMSlope(7,0,19,0,0,100,60,0));
So, you just need to multiply by 2.55 before passing on to the analogWrite function.
Roberto.
- DrewPalmer04
- Posts: 818
- Joined: Tue May 29, 2012 2:12 pm
- Location: Christopher, IL
Re: PWMParabola
Any way to display the % for the output for this on a custom main?
Re: PWMParabola
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.