The problem is: When it comes to break time, it turns to a certain position one last time. This position is always the same.
Does anyone know what I'm doing wrong or how I can get it to stop and stay there ?
Welcome to the forum
Thanks for using code tags in your first post as many newcomers don't
What exactly do you mean by this ?
Please describe exactly what you want the servo to do
Are you expecting to be able to position the servo exactly ? If it is a continuous rotation "servo" then you cannot control its position, only its speed and direction.
Writing a value of approximately 90 to it will stop it but you will need to experiment with the value and it may change as the supply voltage changes
No, not directly. But if I spin the servo for a certain period of time and then stop it, it should stop at a certain position. So if I rotate it in oposite direction for the exact period of time it would be in the same position where it started, right ?
I tried but it didn't work. The problem is not that the Servo does not stop rotating, he does, But before that, he rotates back to 0 position (I don´t know if it´s called 0 but I think so because it´s always the same spot).
Oh sorry I forgot to mention that, its a 360° continous servo.
It will spin in one direction until the ".write(90)" line, than it rotates to the 0 position and stops.
Well a continuous servo has no notion of "position".
Without some kind of feedback, which it lost with a continuous servo, it will be pretty much impossible for the motor to behave so precisely as to stop at the same place when you stop it turning, and then to go exactly the same distance the other way. Stretching the bounds of reality there I'd say.
Okay yes, but there is still the problem that it always rotates to this special angle/position (or what ever). I've seen a lot of videos but none of these do that.