There are a lot of things I don't understand and here is one of them. I have the Parallax 360 servo and getting to know it I saw that sending it a 90 does stop it.
I imagined that 85 would make it go at a certain speed clockwise. And it does.
I imagined that 95 would make it go at a certain speed anti-clockwise. And it does.
But the speeds are different. 85 = fast CW 95 is slow ACW.
I experimented and found that 92 is a good stop value, and +/- some value makes the servo go clockwise and anti-clockwise at about the same speed.
I have two servos and they behave the same.
Is this behaviour normal? Have I missed something? Does each servo need "calibrating"?
Here's my test code:
// Include the library
#include "Servo.h"
// Create the servo object
Servo myservo;
// Setup section to run once
void setup() {
Serial.begin(9600);
myservo.attach(10); // attach the servo to our servo object
myservo.write(90); // stop the motor
}
// Loop to keep the motor turning!
void loop() {
const int ikDeltaSpeed = 10 ;
const int ikZeroSpeed = 92 ;
const int ikClockwiseSpeed = ikZeroSpeed - ikDeltaSpeed ;
const int ikAntiClockwiseSpeed = ikZeroSpeed + ikDeltaSpeed ;
Serial.print ("Start of loop at speed ") ;
Serial.println (ikClockwiseSpeed) ;
myservo.write(ikClockwiseSpeed); // rotate the motor counter-clockwise
delay(5000); // keep rotating for 5 seconds (5000 milliseconds)
Serial.print ("Stop motor ") ;
Serial.println (ikZeroSpeed) ;
myservo.write(ikZeroSpeed); // stop the motor
delay(5000); // stay stopped
Serial.print ("End of loop at speed ") ;
Serial.println (ikAntiClockwiseSpeed) ;
myservo.write(ikAntiClockwiseSpeed); // rotate the motor clockwise
delay(5000); // keep rotating 😀
myservo.write(ikZeroSpeed); // stop the motor
delay(5000); // stay stopped
}