Let me explain first what I want to achieve
I have a radio Control setup with transmitter receiver and ESC.
I can set the ESC for forwards only or Fwd/Rev with center stick position being off
I dont want center stick off because my transmitter doesnt have self center springs and I dont
want to be searching for the mid point off position
but if I go with the forwards only option I cant reverse if I am stuck in a corner
In the Fwd/Rev option with the PWM width at
1000 micro secs its at full speed reverse
1500 micro secs its stopped
2000 micro secs its full speed forward
and of course inbetween these values its a proportional speed
My thought was set the ESC as Fwd/Rev
Have a second switched channel as a fwd/rev switch
Read the throttle channel on an arduino to get its pulse width
have the arduino re send a pwm signal to the ESC but remapped such that
if the fwd/rev switch is set to fwd then take the input pulse width from 0% - 100% and remap it to
a pulse width out of 1500micro secs - 2000 micro secs which sends it forward at 0 to full speed
If the fwd/rev switch is set to rev then take the input pulse width from 0% - 100% and remap it to
a pulse width out of 1500 micro secs to 1000 micro secs which sends it backwards at 0 to full speed
Thats what I would like to do but dont know how to measure the pulse width coming from the receivers throttle channel . I think its pulsein but I am not sure .
or maybe there are libraries written to do all of this more efficiently
or maybe you know of a much better way altogether
Now if I dont do it myself I wont learn anything so I'm not looking for someone to write it for me but I
would appreciate your ideas and help or generally being pointed in the right direction
Cheers
Don