The servo library uses the following defaults for servo range:#define MIN_PULSE_WIDTH 544 // the shortest pulse sent to a servo #define MAX_PULSE_WIDTH 2400 // the longest pulse sent to a servo And, the .write() function, which sends commands in degrees, maps degrees to microseconds as follows: value = map(value, 0, 180, SERVO_MIN(), SERVO_MAX()); (If the defaults aren't changed, SERVO_MIN() and SERVO_MAX() evaluate to MIN_ and MAX_PULSE_WIDTH)With this logic, commanding a servo to 90 degrees (it's center position) will be translated to 1472 microseconds. But, the correct center position for a servo, in microseconds, is 1500. Roughly a 3 degree error.Now, this can be overcome by initializing the servo range, via .attach(), to 600 - 2400 - the nominal range for most servos.But, why is the default min value "wrong"? Is there some historic or legacy reason for this?Thanks,Eric
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16