Created
April 4, 2015 00:05
-
-
Save rockos/837a40bfd46bdd1ac1d9 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 u_srv; | |
Servo l_srv; | |
void setup() | |
{ | |
u_srv.attach(10); | |
l_srv.attach(12); | |
} | |
void loop() | |
{ | |
int pos; | |
for (pos = 10; pos <= 90; pos += 1) | |
{ | |
u_srv.write(pos); | |
l_srv.write(pos); | |
delay(15); | |
} | |
for(pos = 90; pos >=1; pos-=1) | |
{ | |
u_srv.write(pos); | |
l_srv.write(pos); | |
delay(15); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment