pb wise servo programme

hello
i have a problème wis this programme
i cant gate the void aus to fonctionne and the int pos

#include<Servo.h>

Servo myservo1;
Servo myservo2;

int pos myservo1 = 60; // myservo1
int pos myservo2 = 55; //myservo2

void setup() {
  myservo1.attach(9);
  myservo2.attach(10);
 
}

void aus() {
  void setup() {
    for (pos = 60; pos <= 0; pos +=1){
    myservo2.write(pos);
    delay(2);
    }
    for (pos = 0; pos >= 60; pos -=1){
    myservo2.write(pos);
    delay(3)
    }
  }

}

void loop() {
  for (pos = 60; pos <= 70; pos +=1){
    myservo1.write(pos);
    delay(3);
    aus();
  }
  for (pos = 70; pos <= 80; pos +=2){
    myservo1.write(pos);
    delay(3);
    aus();  
  }
  for (pos = 80; pos <= 90; pos +=3){
    myservo1.write(pos);
    delay(3);
    aus();  
  }
  for (pos = 90; pos <= 100; pos +=4){
    myservo1.write(pos);
    delay(3);
    aus();  
  }
  for (pos = 100; pos <= 110; pos +=5){
    myservo1.write(pos);
    delay(3);
    aus();  
  }
  for (pos = 110; pos <= 120; pos +=6){
    myservo1.write(pos);
    delay(3);
  }
  for (pos = 120; pos >= 110; pos -=6){
    myservo1.write(pos);
    delay(3);
    aus();  
  }
  for (pos = 110; pos >= 100; pos -=5){
    myservo1.write(pos);
    delay(3);
    aus();  
  }
  for (pos = 100; pos >= 90; pos -=4){
    myservo1.write(pos);
    delay(3);
    aus();  
  }
  for (pos = 90; pos >= 80; pos -=3){
    myservo1.write(pos);
    delay(3);
    aus();  
  }
  for (pos = 80; pos >= 70; pos -=2){
    myservo1.write(pos);
    delay(3);
    aus();  
  }
  for (pos = 70; pos >= 60; pos -=1){
    myservo1.write(pos);
    delay(3);
    aus();  
  }
  for (pos = 120; pos >= 110; pos -=6){
    myservo1.write(pos);
    delay(3);
      
  }
  
}

thanks for your help

int pos myservo1 = 60;

What’s that?

for (pos = 60; pos <= 0; pos +=1)

How many iterations of that loop do you expect?

for (pos = 0; pos >= 60; pos -=1)And again?

int pos myservo1 = 60; // myservo1
int pos myservo2 = 55; //myservo2

Syntax errors on those lines will cause errors in compiling. Since the code will not compile how do you know that the aus function won't work?

void aus() {
  void setup() {

Another error that will prevent compiling. You cannot define a function within another function. And setup() is not a good name for any function but the one that actually does the processor setup (void setup()).

After you have made a few corrections as suggested it would be a good idea to post all the errors you get when you try to compile this program (in </> code tags please).

Steve

Have a look at the servo sweep example that comes with the Arduino IDE.

...R