Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Servo.h> // it allows us to use the library
- Servo servito;
- const int servoPin=9;
- const int potPin=A0;
- int angle;
- void setup ()
- {
- servito.attach (servoPin); // declares which pin i start with
- pinMode (potPin, INPUT);
- }
- void loop ()
- {
- servito.write (180);
- delay (5);
- servito.write (0);
- delay (5);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement