#include <Servo.h>
Servo myServo;

byte pinButton =  3;
byte pinServo = 4 ; 

void setup() {
  // put your setup code here, to run once:
  pinMode(pinButton, INPUT_PULLUP);
  myServo.attach(pinServo);
  myServo.write(0);

}

void loop() {
  if(digitalRead(pinButton) == LOW){
    myServo.write(90);
  }

}