This week, I've tested the servo limitation and figure out a way to determine the correct maximum and minimum limitation for different servo motors.

So in the example code and in the tutorial, it says:

Using the example code, edit SERVOMIN until the low-point of the sweep reaches the minimum range of travel. It is best to approach this gradually and stop before the physical limit of travel is reached.

But in the reality, it is hard to observe which value is the maximum and minimum value of the micro servo that we used.

Therefore, I wrote another script to test the precise limitation by gradually changing the middle position in the code:

int mid = 85; // you can change this value

and also by observing the real-time situation to determine whether the middle value you set is correct:

After you make sure what is the correct middle point value, then use this to determine the maximum and minimum value by fixing one value(like set the min=0) in the code

The final result can also be checked visually:

Next Post Previous Post