Page 1 of 1

Invert variable SOLVED

Posted: Thu Jan 06, 2011 10:41 am
by dannyvanneijenhoff
Hello,
I have a PWM dimmer, with potentiometer and a push botton input.
The PWM fet driver is changed (inverted), so i want to change the software.

Is there a (easy) way to invert the 0-255 data, what i send to the PWM variable.
So 001 will be 254, and 200 will be 55, exc.

I did not find any info about this, thanks Danny

Re: Invert variable

Posted: Thu Jan 06, 2011 11:10 am
by saschech@gmx.de
Hello

Use a calculation macro,have a look in the function_tab.....
There you show NOT.......
so "pwm_value = NOT pwm_value" convert the pwm_ value from 0 to 255 (if the pwm_value=0)...........

Regards Wolfgang

Re: Invert variable

Posted: Thu Jan 06, 2011 11:29 am
by dannyvanneijenhoff
:P , ooooh is that all. Function NOT, ok thanks.

I could not find the explanation of the functions. the easy one i understand, but there are a few, i don't know yet.
In the help file there is only a explanation of the strings.