RC measuring routine Radio PCM
I am trying to take one inputs from a radio control ie chanel 3, perform some processing on these and output the new
ThrottleMax = previoulsly taught maximum RC signal
ThrottleMin = previoulsly taught minimum RC signal
PulsIn Throtpin, 0, Throttle
pause 10
sPulse = (Throttle - ThrottleMin) * 100 / (ThrottleMax-ThrottleMin)
if some one don this please send some code ..
RC measuring routine Radio PCM
Thaks to all but I have the Problem Fix..
Throttle=0
ThrottleGet1=0
ThrottleGet2=0
ThrottleGet3=0
ThrottleGet4=0
ThrottleGet5=0
PulsIn Throtpin, 0, ThrottleGet1
PulsIn Throtpin, 0, ThrottleGet2
PulsIn Throtpin, 0, ThrottleGet3
PulsIn Throtpin, 0, ThrottleGet4
ThrottleGet5=(ThrottleGet1 + ThrottleGet2 + ThrottleGet3 + ThrottleGet4)
Throttle=((ThrottleGet5 * 1) / 4)