Servo.setMaximumPulse

Name
servo.setMaximumPulse

Description
This function sets the maximum pulse width allowed for the servo specified (That maximum pulse width commonly is equal to 180 degrees position).


 * Since: Beta 32X, releasee 323.


 * Warning!: Servo library uses PIC's Timer1 (TMR1). So, be aware of that in case you plan to use a timer in your application. Otherwise you could disrupt servo library.

Syntax

 * pin : Value: Check valid values according to board : [Servo library supported boards]
 * Argument type: unsigned char


 * pulsewidth : value in microseconds, allowed values must be lower than 2500 microseconds.
 * Argument type: integer


 * Output: None

Example
The following example defines pin 8 as servo driver.

In the loop, position of servo(pin 8) will be alternated from maximum to minimum positions every 2 seconds.

Connectivity diagram is shown within the code comments.