#include <Servo.h>
Servo servo1;
int Switch = 12;
void setup() {
  // put your setup code here, to run once:
  servo1.attach(11);
  pinMode(Switch, INPUT_PULLUP);


}

void loop() {
  // put your main code here, to run repeatedly:
  int SwitchState = digitalRead(Switch);
  if (digitalRead(SwitchState == HIGH)) {
    servo1.write(0);
  }
  else {
    servo1.write(90);
  }
}