Reference.ServoWriteMicroseconds History

Hide minor edits - Show changes to output

November 04, 2009, at 06:09 AM by Paul Badger -
Changed lines 21-22 from:
uS: the value of the parameter in microseconds
to:
uS: the value of the parameter in microseconds (''int'')
November 04, 2009, at 06:07 AM by Paul Badger -
November 04, 2009, at 06:06 AM by Paul Badger -
Changed line 40 from:
* [[ServoAttach | attach]]
to:
* [[ServoAttach | attach()]]
November 04, 2009, at 06:05 AM by Paul Badger -
Changed line 40 from:
to:
* [[ServoAttach | attach]]
November 04, 2009, at 05:43 AM by Paul Badger -
November 04, 2009, at 05:42 AM by Paul Badger -
Changed lines 11-12 from:
Continuous-rotation servos will respond to the writeMicrosecond function in an analogous manner to the [[write|write]] function.
to:
Continuous-rotation servos will respond to the writeMicrosecond function in an analogous manner to the [[ServoWrite|write]] function.
November 04, 2009, at 05:41 AM by Paul Badger -
Added lines 11-12:
Continuous-rotation servos will respond to the writeMicrosecond function in an analogous manner to the [[write|write]] function.
November 04, 2009, at 05:38 AM by Paul Badger -
Changed lines 19-20 from:
angle: the value to write to the servo, from 0 to 180
to:
uS: the value of the parameter in microseconds
Changed line 31 from:
myservo.writeMicroseconds(1500);
to:
myservo.writeMicroseconds(1500); // set servo to mid-point
November 04, 2009, at 05:36 AM by Paul Badger -
Added lines 1-39:
[[Servo]]

!!writeMicroseconds()

!!!!Description

Writes a value in microseconds (uS) to the servo, controlling the shaft accordingly. On a standard servo, this will set the angle of the shaft. On standard servos a parameter value of 1000 is fully counter-clockwise, 2000 is fully clockwise, and 1500 is in the middle.

Note that some manufactures do not follow this standard very closely so that servos often respond to values between 700 and 2300. Feel free to increase these endpoints until the servo no longer continues to increase its range. Note however that attempting to drive a servo past its endpoints (often indicated by a growling sound) is a high-current state, and should be avoided.

!!!!Syntax

''servo''.writeMicroseconds(uS)

!!!!Parameters

servo: a variable of type Servo

angle: the value to write to the servo, from 0 to 180

!!!!Example

[@
#include <Servo.h>

Servo myservo;

void setup()
{
myservo.attach(9);
myservo.writeMicroseconds(1500);
}

void loop() {}
@]

!!!!See also

* [[ServoRead | read()]]

Share