Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Servo.h>
- Servo myServo;
- void setup() {
- myServo.attach(9); // Attach servo to pin 9
- }
- void loop() {
- myServo.writeMicroseconds(1500); // Stop the servo
- delay(1000);
- myServo.writeMicroseconds(1700); // Rotate clockwise
- delay(1000);
- myServo.writeMicroseconds(1300); // Rotate counterclockwise
- delay(1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement