Professional Documents
Culture Documents
Servo Pu Lsador
Servo Pu Lsador
h>
Servo myservo;
void setup()
{
myservo.attach(9);
pinMode(buttonPin, INPUT);
}
void loop()
{
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH) {
val = 90;
}
else {
val = 0;
}
myservo.write(val);
delay(15);
}