I'm new to Arduino and have never used a servo before. I using code from the servo example that comes with the <Servo.h> lib. that "sweeps" the servo from 0 to 180 degrees and back to 0, so on and so forth, code seems to work fine, but my question is (as I've never worked with servos before), as the servo sweeps back and forth it seems very jumpy...not smoth as I thot it would be. Is that normal?
Incase someone needs this to help answer my question.
I'm using an analog servo. Not using any servo motor controller, just hooking the (yellow) wire to Pin 9, (red) to +5v and (black) to -5v external power supply.
Heres code incase this is the problem. (Like I said this came from servo example from <Servo.h> lib.
Thanks everyone for any help!
//Servo test
#include <Servo.h>
Servo myservo;
int pos = 0;
void setup()
{
myservo.attach(9);
}
void loop()
{
for(pos = 0; pos < 180; pos += 1)
{
myservo.write(pos);
delay(15);
}
for(pos = 180; pos > 1; pos -= 1)
{
myservo.write(pos);
delay(15);
}
}