#include <Servo.h>
Servo myservo;
void setup() {
DDRD &=~(1<<2); //pinMode(2, INPUT);
PORTD |=1<<2; //digitalWrite(2, HIGH);
DDRD &=~(1<<3); //pinMode(3, INPUT);
PORTD |=1<<3; //digitalWrite(3, HIGH);
attachInterrupt(digitalPinToInterrupt(2), prerusenie1, FALLING);
attachInterrupt(digitalPinToInterrupt(3), prerusenie2, FALLING);
myservo.attach(11);
myservo.write(0);
}
void loop() {
// put your main code here, to run repeatedly:
}
void prerusenie1(){
myservo.write(0);
}
void prerusenie2(){
myservo.write(90);
}