#include<Servo.h>
const int SERVO=9;
const int BUT1=7;
const int BUT2=4;
int c=0;
Servo myservo;
void setup() {
myservo.attach(SERVO);
pinMode(BUT1,INPUT);
pinMode(BUT2,INPUT);
}
void loop() {
while(digitalRead(BUT1)==1){
myservo.write(c);
delay(50);
c=c+1;
if(c==179){c=0;}
}
while(digitalRead(BUT2)==1){
myservo.write(c);
delay(50);
c=c-1;
if(c==0){c=179;}
}
}