continious rotation servo

i was wondering about using a continuous rotation with my servo, but before opening my servo, and starting to take it apart and such, i wanted to know how would i use a modified servo with continious rotation with an arduino.

can i use the same servo library?
if so, what commands do i send to the servo?

i always thought that once i modified it, i have to send a message of 0 - 90 to make it turn in one direction, and 90 - 180 to make it turn the other direction. is this true?

I bought two continuous rotation servos (~$12 each and saves me the trouble) and the normal code didnt' work for me. Although I don't know if modifying your own will yeild different results. I found code that worked for the servos on these forums, I will paste is below. Its setup to control 2 servos already but there are only controls for 1 in the loop right now. I altered the previous code to make the servo sweep. You'll have to play around with the servonull value until you get your servo to stay in place, then values above that will make it move in one direction and values below that will make it move in the other direction.

//Servo control via direct access to AVR PWM registers



#define servo1control OCR1A       // servo1 is connected to Arduino pin9
#define servo2control OCR1B     // servo2 is connected to Arduino pin10

//servo constants -- trim as needed
#define servo1null 3035
#define servo2null 3000
// Most servos are analog devices so the exact null point may vary somewhat device to device.
// This is particularly true of continuous rotation servos.

void setup(){
  pinMode(9,OUTPUT);
  pinMode(10,OUTPUT);
  TCCR1B = 0b00011010;          // Fast PWM, top in ICR1, /8 prescale (.5 uSec)
  TCCR1A = 0b10100010;          //clear on compare match, fast PWM
                                // to use pin 9 as normal input or output, use  TCCR1A = 0b00100010
                                // to use pin 10 as normal input or output, use  TCCR1A = 0b10000010
  ICR1 =  39999;                // 40,000 clocks @ .5 uS = 20mS
  servo1control = servo1null;         // controls chip pin 15  ARDUINO pin 9
  servo2control = servo2null;         // controls chip pin 16  ARDUINO pin 10
}


void loop(){
  // move servo for demonstration purposes
  servo1control = 2500;             // valid range is servonull +/- 1000
                                   //  - is counter clockwise
                                   //   + is clockwise
                                   // The difference from servonull represents servo angle or,
                                   //for continuous rotation servos, speed.
                                   //These values may differ somewhat unit to unit
  delay(1000);
  servo1control = servo1null;
  delay(3000);
  servo1control = 3570;
  delay(1000); 
  servo1control = servo1null;
  delay(3000); 
}

thank you! i'll have to test it with my servo and see if it works... btw where did u find 12 $ servos?

E-bay is one place:
http://cgi.ebay.com/Hitec-HS-311-Standard-Servo-15s-51-oz-in-HRC31311S_W0QQitemZ270303159791QQihZ017QQcategoryZ34061QQssPageNameZWDVWQQrdZ1QQcmdZViewItem

Lefty, that link doesn't look like a continuous rotation servo. Lazur57 mentioned he paid $12 each and I am wondering where he got continuous rotation servos for that price.

Lazur, the servo control code posted does almost the same thing as the 0012 Servo library. The Arduino supplied library is easier to use, I wonder if you tried it?
It works in degrees so 90 is stop, with increasing values above 90 increasing speed in one direction, decreasing values below 90 increasing speed in the other direction.

just as i thought! thanks mem, and please share the link, 12$ servos would make any person happy!!

$12.99 Continuous Rotation Servo:
http://www.parallax.com/Store/Microcontrollers/BASICStampModules/tabid/134/List/1/ProductID/102/Default.aspx?txtSearch=cont+rotation+servo&SortField=ProductName%2CProductName

btw, yea the basic method for controlling servos does work; either i connected it to the wrong pin last time or something odd happened.

Thanks for the link, it looks a good deal for people that don't want to crack open servos to do the mod.

Please post more on your project when its done.

Have fun!