#include <Servo.h>
int button = 2;
Servo servo_5;
void setup() {
pinMode(button, INPUT);
pinMode(3, OUTPUT);
servo_5.attach(5);
}
void loop() {
// put your main code here, to run repeatedly:
button = digitalRead(2);
if (button == HIGH) {
servo_5.write(90);
digitalWrite(3, HIGH);
} else (button == LOW); {
servo_5.write(0);
digitalWrite(3, LOW);
}
}