|
Re: Need help with PWM 1-2ms pulse control
if (rc_dig_in06 == 1)
{
pwm01 = ((long) Get_Analog_Value(rc_ana_in01) * (127 / 1023) + 127);
}
if (rc_dig_in06 == 0)
{
pwm01 = ((long) Get_Analog_Value(rc_ana_in01) * (- 127 / 1023) + 127);
}
Tada! I think this is right, ill have to give it a try when I get home...
|