#include <Servo.h>
Servo Hyservo;
int pos= 0;
void setup() {
// put your setup code here, to run once:
pinMode (2, INPUT);
Hyservo. attach(3);
}
void loop() {
// put your main code here, to run repeatedly:
if(digitalRead(2)==LOW){
Hyservo.write(185);
}
else
Hyservo.write (0);
}