Servo.attach

Name
servo.attach

Description
This function defines a Pinguino pin as servo driver.

It allows to define any user pin. For pin ranges available visit: [Servo library supported boards]


 * Since: Beta 9.


 * 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 byte


 * Output: None

Example
The following example defines pin 13 as servo driver.

In the loop it's defined a variation of servo position every half second.

Connectivity diagram is shown within the code comments.