|
Re: Need help with PWM 1-2ms pulse control
Alright...I've resoldered the pot now, and its working nicely.
....now into the problem with the casting Set A and Set B. Im not sure what you mean by casting 0 - 126 to Set A and casting 127 - 254 to Set B.
Do you mean that When the switch is set to A side, it will only activate PWM pulses between 0 - 126? and the same with side B ( 127-254)?
How should I seperate the pulses into two groups? Ive only been able to get 1 side of it working. I doubled the numerical value of the pot and that gave me the ability to control PWM pulses between 0 - 127. So it would look something like this:
Before pwm01 = (long) Get_Analog_Value(rc_ana_in01) * 254 / 1024;
After pwm01 = (long) Get_Analog_Value(rc_ana_in01) * 254 / 2048;
Im stumped. Sorry for all these questions, Im not a programmer, but I need to figure this out, so any help is much appreciated.
|