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