Advertisement
Guest User

First Code for Skeleton

a guest
Nov 17th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #include <Servo.h> // it allows us to use the library
  2.  
  3. Servo servito;
  4. const int servoPin=9;
  5. const int potPin=A0;
  6.  
  7. int angle;
  8. void setup ()
  9. {
  10. servito.attach (servoPin); // declares which pin i start with
  11. pinMode (potPin, INPUT);
  12. }
  13.  
  14. void loop ()
  15. {
  16. servito.write (180);
  17. delay (5);
  18. servito.write (0);
  19. delay (5);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement