arduino Servo library - low and high limits settings

Hi folks..... just trying out the Servo library for arduino. Looks good..... but anyone know how the low and high limits parameters work?

For my mg966r servo.... it has a working angle span less than 180 degree. That's no problem.

But .... in order for the servo library to have a reference pulse width for the midpoint angle.... eg 60 deg in a 0 to 120 system..... do we need to accurately measure or find the pulse width value for the extreme cases ....eg pulse width duration for 0 degree and the duration for 120 degree?

I assume the servo library somehow needs to know what 'angles' are associated with those limits of pulse widths in order to let the user use an angle scale (using the 'Write' function).

So far.... I'm using an UNO on timer1 PWM mode #14 to control the servo angle. But figured that I'd like to use the neat and convenient functions of the Servo library.... that allows people to control more servos.

Can anyone point out some details that link the pulse width limit values (from the 'Attach' function) to the angle values (in the 'Write') function?

Eg.... does the servo library take the average between the min pulse width and max pulse width....and associate it with the mid-point (90 degree) angle?

Thanks in advance!

Open source - you have the source! Why not look at the code? I would suggest if you want
precise control of timing that the writeMicroseconds() call is more appropriate than write(),
both because there is no assumption of mapping degrees to timing.

MarkT:
Open source - you have the source! Why not look at the code? I would suggest if you want
precise control of timing that the writeMicroseconds() call is more appropriate than write(),
both because there is no assumption of mapping degrees to timing.

Thanks markT --- I'll check out the source.

The writeMicroseconds should do the trick nicely Thanks a lot.

I'll go for this writeMicroseconds function instead of that angle writing one.

Much appreciated.