Created
August 16, 2016 03:08
-
-
Save chdsbd/e31c22e35073fdd14db2c2be26bffcf0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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