Closed
Description
In other servo libraries calling write()
or writeMicroseconds()
before attach sets the initial position of the servo on attach.
This causes the servo to not work in the latest staging release. See code to reproduce below.
#include <Servo.h>
Servo servo;
int servoPin = 13;
void setup()
{
servo.writeMicroseconds(544);
servo.attach(servoPin);
delay(3000);
}
void loop()
{
int us;
for (us = 544; us <= 2400; us += 2)
{
servo.writeMicroseconds(us);
delay(3);
}
for (us = 2400; us >= 544; us -= 2)
{
servo.write(us);
delay(3);
}
}
Metadata
Metadata
Assignees
Labels
No labels