Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Servo.h>
- Servo my_servo;
- void setup()
- {
- my_servo.attach(6);//Assign pin to component
- }
- void loop()
- {
- my_servo.write(0); //Set servo to 0 deg angle
- delay(1000);
- my_servo.write(90); //Set servo to 90 deg angle
- delay(1000);
- my_servo.write(180); //Set servo to 180 deg angle
- delay(1000);
- }
Add Comment
Please, Sign In to add comment