Guest User

Untitled

a guest
Nov 20th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. Dead band: 2μs
  2. Working frequence: 1520μs / 330hz
  3. Operating Speed (4.8V): 0.18 sec/60°
  4. Operating Speed (6V): 0.16 sec/60°
  5. Stall Torque (4.8V): 17.25 kg/cm
  6. Stall Torque (6V): 20.32 kg/cm
  7. Dimensions: 40.5X20.2X38mm
  8. Weight: 62 g
  9. Connector Wire Length: JR 265 mm
  10. Bearing: 2BB
  11.  
  12. #include <Servo.h>
  13.  
  14. Servo myservo; // create servo object to control a servo
  15. // twelve servo objects can be created on most boards
  16.  
  17. int pos = 0; // variable to store the servo position
  18.  
  19. void setup() {
  20. myservo.attach(3); // attaches the servo on pin 9 to the servo object
  21. }
  22.  
  23. void loop() {
  24. for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
  25. // in steps of 1 degree
  26. myservo.write(pos); // tell servo to go to position in variable 'pos'
  27. delay(15); // waits 15ms for the servo to reach the position
  28. }
  29. for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
  30. myservo.write(pos); // tell servo to go to position in variable 'pos'
  31. delay(15); // waits 15ms for the servo to reach the position
  32. }
  33. }
Add Comment
Please, Sign In to add comment