2599Views4Replies
Servos motion not smooth
Hi,
im trying to program my servo to do a simple sweep (smooth motion).
but instead it jerks a small degree everytime.
the code i've used :
#include <Servo.h>
Servo myservo; // create servo object to control a servo
void setup()
{
myservo.attach(9); // attaches the servo on pin 9 to the servo object
}
void loop()
{
myservo.write(10); // sets the servo position according to the scaled value
delay(1000); // waits for the servo to get there
myservo.write(150); // sets the servo position according to the scaled value
delay(1000);
}
Discussions
8 years ago
In your sketch when you do:
Reply 8 years ago
i did try out the sample sweep code, but the result was the same.
it was working fine when i bought it from the shop, when i went home i took off the tip connectors and solder single core copper wires to them, though i dont see how this would affect the performance.
any ideas as what could be causing this ?
Reply 8 years ago
May have damaged the servo with too much heat when you soldered the new wires on.
Reply 8 years ago
yea i guess i must have damaged the driver,
the motor is working fine, so i turned it into a continuous motor instead.
thanks for the input!