|
Re: Need help with PWM 1-2ms pulse control
The old EDU robot controller has analog inputs with values from 0 to 1023.
The pwm outputs are sent values from 0 to 254.
So just scale the input to match the output like so
Code:
pwm01 = (long) Get_Analog_Value(rc_ana_in01) * 254 / 1023;
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Last edited by Mark McLeod : 30-04-2008 at 15:17.
|