Advertisement
jpglickwebber

Straight Ahead and Straight Back

Apr 9th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #include <Servo.h>;
  2.  
  3. void setup() {
  4. Servo servoLeft;
  5. Servo servoRight;
  6.  
  7. servoLeft.attach(12);
  8. servoRight.attach(11);
  9.  
  10.  
  11. //Forward 1 meter
  12.  
  13. servoLeft.writeMicroseconds(1700);
  14. servoRight.writeMicroseconds(1380);
  15.  
  16. delay(6000);
  17.  
  18. servoLeft.writeMicroseconds(1300);
  19. servoRight.writeMicroseconds(1620);
  20.  
  21. delay(6000);
  22.  
  23. servoLeft.detach();
  24. servoRight.detach();
  25.  
  26. }
  27.  
  28. void loop() {
  29. // put your main code here, to run repeatedly:
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement