Advertisement
Guest User

Untitled

a guest
Nov 17th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. // Include the Servo library
  2. #include <Servo.h>
  3. // Declare the Servo pin
  4. int servoPin = 3;
  5. // Create a servo object
  6. Servo Servo1;
  7. void setup() {
  8. // We need to attach the servo to the used pin number
  9. Servo1.attach(servoPin);
  10. }
  11. void loop(){
  12. // Make servo go to 0 degrees
  13. Servo1.write(0);
  14. delay(600);
  15. // Make servo go to 90 degrees
  16. // Make servo go to 180 degrees
  17. Servo1.write(110);
  18. delay(600);
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement