Servo motor only moves from 90 to 180 degrees

I'm new to arduino and tried to mess around with SG90 servos. For some reason, when I try to move my servo from 0 to 90 to 180 degrees, it starts at 90 (with the command for 0) , goes to 180 (with the command for 90) and then for the command for 180, it moves about 1 degree because it's reached the end of its rotation limit. I've tried 3 different servos, and this is the code I'm using.

#include <Servo.h>

Servo servo;

void setup() {
  // put your setup code here, to run once:
  servo.attach(10);
 
}

void loop() {
  // put your main code here, to run repeatedly:
  servo.write(0);
  delay(1000);
  servo.write(90);
  delay(1000);
  servo.write(180);
  delay(1000);

}

Is there anything I don't know about the calibration of these things, or is there something I'm doing wrong?

Your topic was moved to its current location as it is more suitable.

Could you also take a few moments to Learn How To Use The Forum.

It will help you get the best out of the forum in the future.

Thank you

How are you powering the servo ?


Always show us a good schematic of your proposed circuit.
Show us a good image of your ‘actual’ wiring.
Give links to components.


What happens if you just go from 0 to 180 to 0 . . .

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.