Tower sg 90 servo.

I have a the uno starters kit that had a tower pro sg 90 servo. When I hooked it up it would only rotate thru about 150 degrees. After some research I adjusted the code to myservo.attach(9,544,2600) to adjust the end stops. This gives 180 degrees of movement but 2600 is well above the recommended value. Could a resistor in the circuit change how the servo behaves ( go back to normal setting values ) or is it just something that does not matter and is ok to work with.

No a resistor can't change the PWM pulse lengths. Please post the code that you are using to write to the servo.

I've never met an SG90 that needs that extreme a signal range, they'll usually work on about 800-2200, but I guess anything is possible, they're not exactly precision devices and many of the ones around are not even genuine TowerPro SG90s. If it's not stalling at either end of the travel then it should be o.k.

Steve

How do I post code

Read the "How to use this forum - please read" post at the top of this and every other forum. Then follow the instructions.

Steve

I'm using the sketch from the examples section as I'm only learning. Computer has crashed and had to be reset as it wouldn't open IDE since posting this. Tried this again and had to adjust code to suit a

/* Sweep
 by BARRAGAN <http://barraganstudio.com>
 This example code is in the public domain.

 modified 8 Nov 2013
 by Scott Fitzgerald
 http://www.arduino.cc/en/Tutorial/Sweep
*/

#include <Servo.h>

Servo myservo;  // create servo object to control a servo
// twelve servo objects can be created on most boards

int pos = 0;    // variable to store the servo position

void setup() {
  myservo.attach(9,500,2800);  // attaches the servo on pin 9 to the servo object
}

void loop() {
  for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
    // in steps of 1 degree
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }
  for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }
}

gain.

How do I post code

Check on your post reply on left side toolbars. The icon is </> that is for code input