#include <Servo.h>
Servo myservo;
const int servoPin = 19;
const int buttonPin = 15;
void setup() {
myservo.attach(servoPin);
pinMode(buttonPin, INPUT);
}
void loop() {
int buttonState = digitalRead(buttonPin);
if (buttonState == HIGH) {
myservo.write(90);
}
else {
myservo.write(0);
}
delay(20);
}