#include <Servo.h>
const int Saklar = 13;
Servo servodhimas;
int posisiservo = 0;
void setup() {
pinMode (Saklar, INPUT_PULLUP);
servodhimas.attach(3);
servodhimas.write(0);
}
void loop() {
if (digitalRead(Saklar) == LOW){
posisiservo = 90;
} else {
posisiservo = 0;
}
servodhimas.write(posisiservo);
delay(15);
}