Created
April 22, 2017 05:03
-
-
Save Drunkar/3297c8c7b6f784a1b05235e856243763 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
// https://github.com/netlabtoolkit/VarSpeedServo | |
#include <VarSpeedServo.h> | |
VarSpeedServo myservo1; | |
VarSpeedServo myservo2; | |
VarSpeedServo myservo3; | |
void setup() { | |
myservo1.attach(9); | |
myservo2.attach(10); | |
myservo3.attach(11); | |
} | |
void loop() { | |
// pick up | |
myservo1.write(85, 30, true); | |
myservo2.write(0, 30, true); | |
//myservo3.write(90, 30, true); // open | |
delay(500); | |
myservo3.write(140, 30, true); // close | |
// rotate 90 degrees | |
myservo2.write(45, 30, true); | |
myservo1.write(0, 30, true); | |
// put on | |
myservo2.write(0, 30, true); | |
myservo3.write(90, 30, true); // open | |
myservo2.write(45, 30, true); | |
delay(2000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment