Hacked Servos Won't Reverse Directions

I’ve hacked two servos for continuous rotation for a robotics project. To hack them, I removed the mechanical stop preventing full rotation, and removed a key that holds the shaft to the pot. This way, the pot stays in one place.

I uploaded the following code to my Arduino Duemilanove 328 from Arduino 018

I removed the comment slashes for each section and uploaded it to the board one at a time. I cannot get the servos to rotate the opposite direction. Setting write to 0 does nothing, setting write to -180 slowly rotates the servo in the opposite direction.

The servos are plugged into a Motor Shield from Adafruit, which is connected to pins 9 and 10, plus power and ground. I am using external power (4.8v) for the motor shield, and 9v to power the Arduino.

Besides the obvious that my servo pots may not be centered, any ideas on the code? I’ve not worked with servos before. When you hack them, 0 is full backwards, about 90 is stop and 180 is full forward, right? I’ll try using the stop code and making sure the pots are centered. (turn the pot until the servo stops)

#include <servo.h>

Servo servoL; //create instances of servos L & R
Servo servoR;

void setup
{
servoL.attach(9) //Attach servos L & R to Pins 9 & 10
servorR.attach(10)
}

void loop

/forward
servoL.write(180)
servoR.write(0)
/

/Backward
servoL.write(0)
servoR.write(180)
/

/Right
servoL.write(0)
servoR.write(0)
/

/Left
servoL.write(180)
servoR.write(180)
/

/Stop
servoL.write(90)
servoR.write(90)
/

What position did you leave the pot in? It should be centred.

That is a good question, and I think I'll have to tear it apart again to find out. I assume loading code to center it (servo.write(90)) and then turning the pot until the servo stops moving is the best bet.

I'll try this and let you know. Hopefully, the 2 sided tape I used to mount it comes off easily.

Thanks!