Continuously Rotating Servos

I have a pair of servos that were modded to rotate continuously about a year ago. I've been trying to make them rotate with the command:

servo 0, 1 : servo 1, 1

but I find that this does nothing but make the servos twitch. However, when I use:

servo 0, 1 : servo 1, 1

wait 2

the servos rotate clockwise for two seconds. Furthermore, when I use:

servo 0, 2 : servo 1, 2

wait 2

they rotate counter-clockwise. My questions are, why do I have to apply the 'wait 2' command to get them to rotate and if 1 is clockwise and 2 is counter-clockwise which degree value is stop?


The wait command is needed,

The wait command is needed, since other wise you end up resetting the position right away.

What your code does is:

set servo 0 to position 1(not sure what language you’re using so it might mean something else)

set servo 0 to position 2


That’s why you need the wait 2 bit, otherwise it just goes to position 1 and position 2 really fast(like several times a millisecond) and that won’t do much.


Thanks. I’m using picaxe

Thanks. I’m using picaxe basic. If setting the servo to position 1 rotates it clockwise and position 2 rotates counter-clockwise which position stops the servo?

Could you try a test

where you loop from 0 to 255 on a servo?

After looking at manual 2 again it says servo pin,pulse . So, the program would be something like:

   for b0 = 0 to 255
      servo 0, b0
      wait 2
   next b0



Read the Picaxe Manual 2 entry for the Servo command.

SERVO pin,pulse

- Pin is a variable/constant which specifies the i/o pin to use.

- Pulse is variable/constant (75-225) which specifies the servo position

The pulse parameter should NEVER be less than 75 or higher than 255. This would destroy a normal servo, because you are asking it to go to a position beyond it’s mechanical stops. With a continuous servo, it may not be dangerous, but it won’t be effective.

The correct method is to find the center postion (should be about 150), and use that as the command to stop the servo. This number may vary a bit by servo, and may vary with temperature as well.

If you set the pulse parameter less than center, it will turn one way. Set it above center and it will turn the other. The closer you set it to the two end points (75 and 225) the faster it will go.


Running your code and with a debug thrown into it I was able to find the center of servo 1, but on servo 2 at position 126 the servo is moving very slowly clockwise in position 127 it is moving very slowly counter clockwise. Why does it not have a center

Why is the pulse command a

Why is the pulse command a value from 75-255 (a distance of 150) when there are servos with more than 150 degrees?


Once again, be careful. The

Once again, be careful. The servo range is from 75 to 225, not 255. I’ve busted servos with that mistake.

Some servos can turn a full 180 degrees, some a bit less or a bit more.

Also, you’ll see that some (perhaps most) servos are not completely linear. So changing the command from servo 0, 150 to servo 0, 151 is not going to move it by exactly 1 degree.

Well, all servos are a

Well, all servos are a little different, and as I said in another comment, they are typically not linear.

If your servo is under load, is the weight of your robot enough to make it stop moving?

Had he not already stated

that they were continuous rotation. I would not have suggested 0 to 255. I will admit that 0 to 255 is really excessive, but, it shouldn’t harm anything as the servo will rotate without harm.

I will admit I don’t have any hands on experience and could be completely and utterly wrong.

Solved (sorta)

While I wasn’t able to get the servo to stop on it’s own, I was able to get it to stop while under a load. Thanks for the help!