
WVAEngineer
USA
Asked
— Edited
I only just opened my EZ-Robot Package tonight, but it seems the centering button on the horizontal servo control is not working correctly.
I think the center position should be the maximum value minus the minimum divided by two then added to the min. OR,
CENTER = (MAX-MIN)/2+MIN
It appears to be simply (MAX-MIN)/2.
For example if you set the MAX value to 70 and the MIN value to 30, the CENTER value should be 50. It is 30. That is because the minimum value has to be 30, but (70-30)/2 is 20. If you set the value MIN value to 15, the CENTER value will incorrectly be 28. That is (70-15)/2=27.5. It should be (70-15)/2+15=42.5. So the Center should be 43.
I hope this helps
So are you saying you made a custom servo script for centering you feel works better?
I had noticed this previously but never use the centre button so it slipped my mind. I have a feeling it has been mentioned before too though.
Also, if you check my Ping Roam script there is code to calculate the centre position for scripts if anyone needs it
(Basically Min + Max / 2)