The Wiring 1.0 _ALPHA_ Reference is a work in progress.
If you see any errors or have any comments, please write to: hbarragan [at] uniandes.edu.co
Name
detach()
Examples
#include <Servo.h>
Servo myservo;
void setup() {
myservo.attach(2) // attaches a servo connected to pin 2
}
void loop() {
if(myservo.attached()) { // If the servo is attached
myservo.write(90); // position the servo angle at 90 degrees
myservo.detach(); // detach the servo motor
}
}