[Solved]Servomotor and 360°

I do believe after reading some docs over servomotors that a servomotor isn’t supposed to go over 180°, however, mine turned for a while(in the same direction).
I used this code :

#include <Servo.h>
Servo monServomoteur1;
int position_ini;

void setup() {
// put your setup code here, to run once:

void loop() {
void turn(int p1, Servo monServomoteur, int p2){
int pos =p2;

Did I broke my servomotor or is there something I didn’t understand about 0 to 180°.

Hi NoServo, welcome to the forum.

Do you have a link to the servo you are using?

Standard servos work through a defined range, usually a bit less than 180 degrees, but it varies.
And many servos are modified, either by the end user or at the factory, to be continuous rotation or 360 degree servos. These servos have no positional awareness and are really just nicely packaged DC motors with a driver and gearbox.

If you let us know what you have, we can help you with your understanding.

Hi vinceherman and thank you for your quick answer.
I used this one:

I guess it means I am just using a continuous rotation motor working with the library Servo.

You got it. With a continuous rotation servo like you have, monServomoteur.write(pos) will control the direction and speed of the rotation, rather than the position as with a standard servo:

On a continuous rotation servo, this will set the speed of the servo (with 0 being full-speed in one direction, 180 being full speed in the other, and a value near 90 being no movement).