Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#include <Servo.h>
int servoPin = 3;
Servo myservo;
void setup() {
myservo.attach(servoPin);
}
void loop() {
for( int pos = 0 ; pos <= 180; pos++){
myservo.write(pos);
delay(15);
}
for( int pos = 180; pos>= 0; pos--){
myservo.write(pos);
delay(15);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.