Void Setup, servo position?

Hey can somebody tell if this is correct:

#include <Servo.h> 
 
Servo s1;  
Servo s2; 
Servo s3;    
Servo s4;
Servo s5;
Servo s6;


 
void setup() 
{ 
   s1.attach(9); 
   s2.attach(8);
   s3.attach(7);
   s4.attach(6);
   s5.attach(5);
   s6.attach(4);
    s1.write(90);
   s2.write(90); //<---- this part here???
  s4.write(30); // and this one!
     
} 
 
 
void loop() 
{ 
  s3.write(45);
  //etc...... 
 
 
}

Can I do that? I’m trying to make servo to stay at one position all the time as program is running. Any other ideas are welcome. Thanks.

You should .write() the position you want to start at BEFORE you .attach() the servo pin. If you don't specify a position first it will head for some default position and then possibly change direction when you do the first .write().

Yes, once the servo position is set and the servo attached it will try to maintain that position until you specify a new position or detach.

Thank you very much for reply!