In the process of designing a device to increase the travel of a hobby servo, I discovered that the servo and pulsout commands do not seem to give the same position information to the servo.
I would have expected the following examples to give the same result:
for b2=0 to 150
pulsout 1,200
pause 19
next b2
and
servo 1,200
The difference is about 10° of rotation. I am using a -08M.
It is important in my code since I use both commands. During setup and normal operation I read the input pulse from the receiver, scale it, and then output to the servo. In the event of a loss of radio signal, I send the servo to a predefined position (as dictated by the user during setup), but can no longer use pulsout since there is no syncronising pulse. Instead I use servo (and subsequent servopos) to move to the failsafe position.
I can't do much in code to try and scale one or the other to make them match since I am down to only 3 bytes of unused program memory.
Any ideas, suggestions or explanations?
I would have expected the following examples to give the same result:
for b2=0 to 150
pulsout 1,200
pause 19
next b2
and
servo 1,200
The difference is about 10° of rotation. I am using a -08M.
It is important in my code since I use both commands. During setup and normal operation I read the input pulse from the receiver, scale it, and then output to the servo. In the event of a loss of radio signal, I send the servo to a predefined position (as dictated by the user during setup), but can no longer use pulsout since there is no syncronising pulse. Instead I use servo (and subsequent servopos) to move to the failsafe position.
I can't do much in code to try and scale one or the other to make them match since I am down to only 3 bytes of unused program memory.
Any ideas, suggestions or explanations?