Apologies if this is a double post. Still learning my way around here.
How do you test a servo to see if it's working? It's a PWM servo with about a 120 degree sweep range. I've wired it up to a ProMini to connect it first to Digital Pin 3, which is a PWM pin, and then to Digital Pin 9, also PWM. The servo's RED wire was connected to VCC and its BLACK wire connected to GND.
I tried the Sweep sketch and the Knob sketch with this servo and got nothing but "jittery". So I wrote a sketch to just move the servo to four angles - and again got just "jittery".
Thought it might be a connection problem so I put an LED between the Servo's control line an ground. It lit when the Servo.write instructions were execuated so joice is getting to the control line pin.
Have I got a bad Servo - or what? How do you test a servo?
Here's the sketch I'm using to test the servo:
#include "Servo.h"
Servo myservo;
void setup()
{
myservo.attach(9);
myservo.write(60); // set servo to mid-point
}
void loop()
{
myservo.write(1);
delay(1000);
myservo.write(45);
delay(2000);
myservo.write(90);
delay(3000);
myservo.write(120);
delay(4000);
myservo.detach();
delay(6000);
myservo.attach(9);
}