loading

Standard Servo turns in one direction then locks up.?

I typed your program that tests the standard servo on to the IDE, then up loaded it. The IDE was green as it accepted the up load. The standard servo spins to the right (which moves the phone holder down) then the servo locks up. I unplugged it and it can be manually moved in any direction. I then literally high-lighted your program, copied and pasted it on to the IDE, then up loaded it and again it was green. I did that to make sure that I didn't make a mistake in my typing. The servo continued to do the same thing, spins in one direction then locks up. I disconnected it from the hanger wires to make sure that it wasn't the set-up that kept the servo from moving back and forth. It wasn't. It continued to do the same thing. As I said before, it spins in one direction then locks up. Is it a bad servo? Can you please help? Thank you.


randofo25 days ago

Are you using a Parallax servo? Can you paste the code you are using to control the servo into the comments here?

Builder-1A (author)  randofo23 days ago

Yes, Sir, it is a Parallax Standard Servo...but before I paste the code... When I up-loaded the code for the StandardServo1, I had everything wired and the six "AA" batteries installed. When I hit the arrow to up-load, the wheels started turning. I had to disconnect them from the Arduino. Is it possible that the previous up-loads are also running and causing a conflict? Was I suppose to delet the previous codes instead of save them? Anyway, the code I up-loaded for StandardServo1 is,

/*

Telepresence Robot - Tilt Test Code

Code tilts the phone holder up and down.

*/

// Include the servo library

#include <Servo.h>

// Tell the Arduino there is a standard servo

Servo StandardServo1;

void setup() {

// Attach the standard servo to pin 5

StandardServo1.attach(5);

// Send the standard servo to it's neutral position

StandardServo1.write(90);

delay(2000);

}

void loop() {

//Tilt up and pause

StandardServo1.write(135);

delay(2000);

// Go to center and pause

StandardServo1.write(90);

delay(2000);

// Tilt down and pause

StandardServo1.write(45);

delay(2000);

// Go to center and pause

StandardServo1.write(90);

delay(2000);

}

Can you spin the servo shaft by hand? Do you hear or feel any clicking or grinding?