Hi,
I'm trying to control a digital servo with arduino nano, but sometimes it stuck to certain angle or skip an angle from the code shown.
when i connect the ordinary tower pro servo (analog) it works fine.
I need help, i spent 4 days searching the internet with no luck.
I attached the code, digital servo sheet, serial monitor data.
Thanks,
#include <Servo.h>
Servo myservo; // create servo object to control a servo
void setup() {
myservo.attach(6); // attaches the servo on pin 9 to the servo object
Serial.begin(9600);
}
void loop() {
myservo.write(0); // sets the servo position according to the scaled value
Serial.println("0");
delay(2000); // waits for the servo to get there
myservo.write(45); // sets the servo position according to the scaled value
Serial.println("45");
delay(2000); // waits for the servo to get there
myservo.write(90); // sets the servo position according to the scaled value
Serial.println("90");
delay(2000); // waits for the servo to get there
}


