Skip to content

Instantly share code, notes, and snippets.

@chdsbd
Created August 16, 2016 03:08
Show Gist options
  • Save chdsbd/e31c22e35073fdd14db2c2be26bffcf0 to your computer and use it in GitHub Desktop.
Save chdsbd/e31c22e35073fdd14db2c2be26bffcf0 to your computer and use it in GitHub Desktop.
#include <Servo.h>
Servo myservo;
void setup()
{
myservo.attach(14);
myservo.write(90); // set servo to mid-point
}
void loop() {
for (int i = 0; i < 180; i += 15) {
myservo.write(i);
delay(1000);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment