Servo

The Wiring servo motor library allows for easily manipulating a standard servo motor connected to a pin.

A Servo motor is a special kind of motor. it has an output shaft that can be positioned to specific angular positions by sending the servo a coded signal. As long as the coded signal exists on the input line, the servo will maintain the angular position of the shaft. As the coded signal changes, the angular position of the shaft changes. Because of this they are commonly used in remote airplane control, robotics and tasks requiring precision. Up to 24 servos can be working at a time.

 

Servo
Class for manipulating servo motors connected to the Wiring I/O board pins

attach()
Attaches a servo motor to an i/o pin

read()
Gets the servo motor position

write()
Sets the servo motor position angle

attached()
Returns if there is a servo attached

detach()
Detaches a servo motor from an i/o pin

readMicroseconds()
Gets the last written servo pulse width in microseconds

writeMicroseconds()
Sets the servo pulse width in microseconds