I use a 360° servo with a program I made on an Arduino Uno.

The program was meant to control two separate servos with two potentiometers on a breadboard.

When I used 180° and 90° servos, it worked fine, but when the 180° servo was swapped with a 360° servo, it kept spinning and spinning non-stop.

Could it be the knock-off board (not Arduino brand) I'm using?

Servo serX;    // create servo object to control a servo for x axis
Servo serY;    // create servo y axis

int pot1 = 0;  // potentiometer pin number on board
int pot2 = 1;  // potentiometer number 2
int val;       // variable to read the value from the analog pin
int val2;      // read value from other analog pin

void setup() {
  serX.attach(9);  // attaches the servo on pin 9 to the servo object
  serY.attach(10); // attach servo to number 10 pin

void loop() {
  val = analogRead(pot1);           // reads the value of the potentiometer
  val = map(val, 0, 1023, 0, 180);  // scale it to use it with the servo
  serX.write(val);                  // sets the servo position
  val2 = analogRead(pot2);          // reads the value of the potentiometer
  val2 = map(val2, 0, 1023, 0, 90); // scale it to use it with the servo
  serY.write(val2);                 // sets the servo position
  delay(15);                        // waits for the servo to get there
  • 5
    Is this a "continuous rotation" servo? If so then the "angle" defines the speed and direction of rotation, with 90° normally being "stop".
    – Majenko
    Jan 23, 2022 at 14:15

1 Answer 1


The "360°" you refer to is probably a continuous-rotation servo.

These servos behave more like motors than like the normal RC servos; the signal you send such a servo will determine its speed and direction, not its position, and a pulse width of 1.5 ms (the "90° setting") will make it stop.

There's an article on the Adafruit site where you can read more about this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.