Continuous servo and standard micro servo together in 1 sketch

Greetings! Pardon me if this question has been answered before. I did not read anything resembling my question.
I'm trying to sketch a 360 servo for camera slider and have copied code that works with my setup and have tweaked the numbers to fit my purpose. I'm also trying to work a standard servo to click my remote intervalometer, mechanically, using a horn arm, for fear of frying my camera if i click it automatically using arduino uno. When I get more experienced I'll let the arduino do all the work. Maybe you could steer me in the right direction.
I have the 2 sketches working perfectly by themselves but when I write them together in one sketch, i get errors. I may have syntax issues.
Here's what I have.

For 360 continuous servo:

#include <Servo.h>

Servo Ron1; // create servo object to control a servo
// twelve servo objects can be created on most boards

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

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

void loop()
{
for(pos = 0; pos <= 180; pos += 1) // goes from 0 degrees to 180 degrees
{ // in steps of 1 degree
Ron1.write(91.5); // tell servo to go to position in variable 'pos'
delay(1); // waits 15ms for the servo to reach the position
}
for(pos = 180; pos>=0; pos-=1) // goes from 180 degrees to 0 degrees
{
Ron1.write(87); // tell servo to go to position in variable 'pos'
delay(65.9); // waits 15ms for the servo to reach the position
}

And for standard micro servo:

#include <Servo.h>

Servo Ron2; // create servo object to control a servo
// twelve servo objects can be created on most boards

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

void setup()
{
Ron2.attach(10); // attaches the servo on pin 10 to the servo object
}

void loop()
{
for(pos = 180; pos <= 0; pos += 1) // goes from 0 degrees to 25 degrees
{ // in steps of 1 degree
Ron2.write(pos); // tell servo to go to position in variable 'pos'
delay(10); // waits 15ms for the servo to reach the position
}
for(pos = 50; pos>=0; pos-=1) // goes from 20 degrees to 0 degrees
{
Ron2.write(pos); // tell servo to go to position in variable 'pos'
delay(300); // waits 15ms for the servo to reach the position
}
}

Thank you to anyone who could help.

Sincerely,
RonSA

Please post the code you are having trouble with in code tags. Also the full text of all errors.

some code in code tags
for(pos = 180; pos <= 0; pos += 1) // goes from 0 degrees to 25 degrees
  {                                  // in steps of 1 degree

If the comment doesn't describe the code, it's pointless having it.

   delay(65.9);

That's an expensive way of writing 65.

Servo.write() takes int data type so float there is a waste, too.

Ron1.write(91.5);

You cannot control the position of a continuous rotation servo - only its speed and direction. Hence there is no point having a FOR loop. Just leave it to work for whatever time is needed to move the distance you want.

If you post your code using the code button </>

so it looks like this

I will be able to select it and copy it to my text editor and give you more advice.

...R

for(pos = 180; pos <= 0; pos += 1) // goes from 0 degrees to 25 degrees

Oh dear. The value of pos (declared as an int) is going to start at 180 and be incremented by 1 until its value is zero. How many steps will that be ?

Sorry for the newbie mistakes. Here's the codes where they're supposed to be placed as attachment that I'm trying to tie-in together in one arduino uno sketch.
And this is the error message:

Arduino: 1.6.5 (Windows 7), Board: "Arduino Uno"

sketch_aug27_standard_and_360_servo.ino: In function 'void loop()':
sketch_aug27_standard_and_360_servo:36: error: a function-definition is not allowed here before '{' token
sketch_aug27_standard_and_360_servo:41: error: a function-definition is not allowed here before '{' token
sketch_aug27_standard_and_360_servo:52: error: expected '}' at end of input
a function-definition is not allowed here before '{' token

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

sketch_aug27_standard_and_360_servo.ino (1.81 KB)

Arduino error.txt (600 Bytes)

#include <Servo.h> 
 
Servo Ron1;  // create servo object to control a servo 
                // twelve servo objects can be created on most boards
 
int pos = 0;    // variable to store the servo position 
 
void setup() 
{ 
  Ron1.attach(9);  // attaches the servo on pin 9 to the servo object 
} 
 
void loop() 
{ 
  for(pos = 0; pos <= 180; pos += 1) // goes from 0 degrees to 180 degrees 
  {                                  // in steps of 1 degree 
    Ron1.write(91.5);              // tell servo to go to position in variable 'pos' 
    delay(1);                       // waits 15ms for the servo to reach the position 
  } 
  for(pos = 180; pos>=0; pos-=1)     // goes from 180 degrees to 0 degrees 
  {                                
    Ron1.write(87);              // tell servo to go to position in variable 'pos' 
    delay(65.9);                       // waits 15ms for the servo to reach the position 
 } 


#include <Servo.h> 
 
Servo Ron2;  // create servo object to control a servo 
                // twelve servo objects can be created on most boards
 
int pos = 0;    // variable to store the servo position 
 
void setup() 
{ 
  Ron2.attach(8);  // attaches the servo on pin 8 to the servo object 
} 
 
void loop() 
{ 
  for(pos = 180; pos <= 0; pos += 1) // goes from 0 degrees to 25 degrees 
  {                                  // in steps of 1 degree 
    Ron2.write(pos);              // tell servo to go to position in variable 'pos' 
    delay(10);                       // waits 1ms for the servo to reach the position 
  } 
  for(pos = 50; pos>=0; pos-=1)     // goes from 20 degrees to 0 degrees 
  {                                
    Ron2.write(pos);              // tell servo to go to position in variable 'pos' 
    delay(300);                       // waits 1ms for the servo to reach the position 
  } 
}

Check out this site. combine sketches tutorial
Try to combine your two sketches. Show your attempt and if it doesn't work we can fix it.

Show your attempt and if it doesn't work we can fix it.

Psst, reply #7 - the one with two "setup"s and two "loop"s

Maybe try this - not verified, not tested

#include <Servo.h> 
 
Servo contRot; 
int contRotSpeed = 90;    // variable to store the servo speed/direction - begin with it stopped
const byte contRotPin = 9;

Servo regServo;  
int regServoPos = 0;    // variable to store the servo position 
const byte regServoPin = 8;
 
void setup() 
{ 
  contRot.attach(contRotPin);
  regServo.attach(regServoPin);
} 
 
void loop() 
{ 
      // first move the continuous rotation servo
   contRot.write(92);             
   delay(1000);                      
    
   contRot.write(87);              
   delay(1000);                       

      // then move the regular servo
  for(regServoPos = 180; regServoPos <= 0; regServoPos += 1)
  {                                
    regServo.write(regServoPos);             
    delay(50);                       
  } 
  for(regServoPos = 50; regServoPos >=0; regServoPos -=1)     
  {                                
    regServo.write(regServoPos);              
    delay(300);                       
  }  

}

...R