Continuous rotation servo

Hello I'm new user of a Arduino Uno. I have two analog continuous rotation servo(modelcraft RS-2) and I want to use them for moving one simple robot. Question: If anybody can help me, link me or post here codo for me of endless rotation of two servo( they must turning for 360° over and over again, until i clik reset button)

Thanks for help!

wolfslo

Look at Servo library. A continuous rotation servo will need to be set at approx 90 degrees to stop. 0 will turn one direction and 180 the other. There will be some deadband around 90 and the speed will be faster as you give it a value farther from 90.

Lookup the Servo library in the language refence.

Can somebody post here test cdede for continuon rotation for one servo?

Just to be put on record once again. A servo that has been modified for continuous rotation is no longer a 'servo' but rather a bidirectional variable speed geared motor drive. It's former life as a servo are long gone, lobotomized forever, and should not be even called a servo.

However I will concede that such a bidirectional variable speed motor drive still needs to be controlled via a servo library as the now brain dead servo still requires a 1000-2000 microsecond PPM control signal to operate, which the servo library provides for.

Modifying a servo for continuous rotation duties is like taking a fine sports car and welding a pick-up truck's bed to the back because you want to haul trash to the dump once and awhile.

Lefty

Modifying a servo for continuous rotation duties is like taking a fine sports car and welding a pick-up truck's bed to the back because you want to haul trash to the dump once and awhile.

I look at a DIY continous rotation servo as a bidirectional variable speed gear motor for $2-5 instead of $20-50 or more. But you can spend your money however you want. ;)

Question: If anybody can help me, link me or post here codo for me of endless rotation of two servo( they must turning for 360° over and over again, until i clik reset button)

Some servo test code that simulates buttons controlling servos.

//zoomkat servo button test 12-29-2011

#include <Servo.h>
int button1 = 4; //button pin, connect to ground to move servo
int press1 = 0;
int button2 = 5; //button pin, connect to ground to move servo
int press2 = 0;
Servo servo1;

void setup()
{
  pinMode(button1, INPUT);
  pinMode(button2, INPUT);
  servo1.attach(7);
  digitalWrite(4, HIGH); //enable pullups to make pin high
  digitalWrite(5, HIGH); //enable pullups to make pin high
}

void loop()
{
  press1 = digitalRead(button1);
  if (press1 == LOW)
  {
    servo1.write(170);
  }    
  
  press2 = digitalRead(button2);
  if (press2 == LOW)
  {
    servo1.write(10);
  }
  
  /*else {
    servo1.write(90);
  }*/
}

zoomkat:

Modifying a servo for continuous rotation duties is like taking a fine sports car and welding a pick-up truck's bed to the back because you want to haul trash to the dump once and awhile.

I look at a DIY continous rotation servo as a bidirectional variable speed gear motor for $2-5 instead of $20-50 or more. But you can spend your money however you want. ;)

And I support that application fully. But then YOU already realize what you are buying and why. It's the hoard of begineers that get these 'modified servos' not realizing the differences between the continuous rotation and normal servos and what they gave up by chosing to buy the former.