Controlling servos.

I’m having trouble with something I would think was fairly simple.
I just need to control two servos. Nothing fancy, just turning them to a position and stopping there.
This is what I have done so far.

#include <Servo.h>

Servo servoOne;
Servo servoTwo;

const int buttonPin = 2;   

int buttonState = 0;
int posHigh = 170;
int posLow = 1;

void setup() {     
    pinMode(buttonPin, INPUT);

void loop(){
  buttonState = digitalRead(buttonPin);
  if (buttonState == HIGH) {
  else if (buttonState == LOW) {

This does what I want, but I would like the movement to be slower.
I tried using the Sweep example and I can control the speed but I can’t figure out how to stop it from going back and forth.
Basically I need the servos to go to 0 degrees when my switch is low and 180 degrees when it is high. But slower than just writing the end angle to the servo.

This does what I want, but I would like the movement to be slower.

So, take smaller steps, with a pause between steps.

Before you start whining then that that makes your system unresponsive, DO NOT USE DELAY().

Read, understand, and embrace the blink without delay example's philosophy.

Similar request below.
Edit: if you want the servos to move the same, you could use the same servo pin connected to both servos.

Thanks for the replies. I found the VarSpeedServo library. Works like a charm.