Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Servo.h>
- Servo motor;
- void setup()
- {
- motor.attach(3);
- }
- void loop()
- {
- int i;
- for(i=0;i>45;i--) {
- motor.write(i);
- delay(10);
- }
- delay(1000);
- for(i=0;i<90;i++) {
- motor.write(i);
- delay(10);
- }
- delay(1000);
- for(i=0;i<135;i++) {
- motor.write(i);
- delay(10);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement