I have it hooked up to my arduino using the knob sketch, and it skips a range of angles. I cann ot have it do some angles because it wont. Here are the servos I am using https://www.amazon.com/Micro-Servos-Helicopter-Airplane-Controls/dp/B07MLR1498/ref=cm_cr_arp_d_product_top?ie=UTF8
Which angles? Perhaps its defective, perhaps you are expecting it to have more range than 120 degrees (many
servos only have about 120 degrees range).
It is 360, and i do not know how many. Maybe you are right. I will get new ones.
alecjensen:
and it skips a range of angles.
What does that even mean?
alecjensen:
It is 360
Not according to the link you gave:
Maximum rotation angle: 180 degrees
I wouldn't be surprized if its significantly less than 180 degrees in reality either.
From your link:
Specification:
Model: SG90
Weight: 9g
Stall torque: 1.8kg/cm
Operating speed: 0.1sec/60degree
Operating voltage: 4.8V
Temperature range: 0℃ ~ +55℃
Dead band width: 10us
Maximum rotation angle: 180 degrees
Gear medium: nylon
Working mode: Simulation
Circuit connection:
Yellow line (signal line)
Red line (power line)
Brown (ground)
They say 180 degrees. I don't see your code but you may want to just try a simple code which will increment 0 to 180 degrees and decrement back to 0 in 1.0 degree increments. That will tell you if it's the servo.
Ron
"It is 360, and i do not know how many. Maybe you are right. I will get new ones."
Some very simple servo test code you might use to check the operation of your servo
// zoomkat 7-30-10 serial servo test
// type servo position 0 to 180 in serial monitor
// for writeMicroseconds, use a value like 1500
// Powering a servo from the arduino usually *DOES NOT WORK*.
String readString;
#include <Servo.h>
Servo myservo; // create servo object to control a servo
void setup() {
Serial.begin(9600);
myservo.attach(9);
}
void loop() {
while (Serial.available()) {
if (Serial.available() >0) {
char c = Serial.read(); //gets one byte from serial buffer
readString += c; //makes the string readString
delay(3);
}
}
if (readString.length() >0) {
Serial.println(readString);
int n = readString.toInt();
Serial.println(n);
myservo.writeMicroseconds(n);
//myservo.write(n);
readString="";
}
}