several servoes

  val = analogRead(potpin);            
  val = map(val, 0, 511, 0, 40);     
  myservo.write(val);                  
  delay(1500);

This is repeated twice in the code

Edited to remove drivel :smiley: