//Initial test for servo and spray bottle
Servo servoMove;
int servo = D0;
int buttonPress = D3;
int servoAngle = 0;
void setup() {
pinMode(buttonPress, INPUT);
pinMode(servo,OUTPUT);
servoMove.attach(D1);
}
void loop(){
if (buttonPress == HIGH){
servoMove.write(180);
delay(200);
servoMove.write(0);
delay(200);
}
}
Click to Expand
Content Rating
Is this a good/useful/informative piece of content to include in the project? Have your say!
You must login before you can post a comment. .