continues servo only rotates in one direction

Hi, I have modified a HiTec Hs-311 servo for continues rotation. Now I’m trying to get the servo to rotate in both directions. (CW and CCW)
It works fine CW with speed increasing from slow to high. I searched the forum and have tried a lot of code samples that are out there. None worked. I googled the topic but still did not find anything that worked.

I used the following code:
// Sweep

#include <Servo.h>

Servo myservo; // create servo object to control a servo
// a maximum of eight servo objects can be created

int pos = 0; // variable to store the servo position

void setup()
myservo.attach(9); // attaches the servo on pin 9 to the servo object

void loop()

myservo.write(pos); // tell servo to go to position in variable ‘pos’
delay(600); // waits 15ms for the servo to reach the position
pos = 0;


As I understand it 0 - 90 should be CW and 90 - 180 CCW. Any value drives the servo clockwise. If somebody could direct me in the right direction that would be great. Thanks.


The sweep or knob servo example sketches would be good tests.

Have you tried to adjust the servo position feedback pot. Most tutorials describing how to modify a servo for continuous rotation explain how to do this.

Thank I will give it a try.