Servo myservo;
int button7 = 0;
int button6 = 0;
int pos = 90;
VOID Setup
{
pinMode (7, INPUT);
pinMode (6, INPUT);
myservo.attach(9);
}
void loop
{
button7=digitalRead(7);
Button6=digitalRead(6);
myservo.write(POS);
delay(5);
POS=Constrain(POS,0,180);
Als (button7 == 1 & & button6 == 0)
{
POS ++;
}
Als (button7 == 0 & & button6 == 1)
{
POS--;
}
}