SHARE
TWEET

Stigern

a guest May 3rd, 2009 1,446 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <Servo.h>
  2.  
  3. Servo myservo;  // create servo object to control a servo
  4.                 // a maximum of eight servo objects can be created
  5.  
  6. int pos = 0;    // variable to store the servo position
  7.  
  8. void setup()
  9. {
  10.   myservo.attach(9);  // attaches the servo on pin 9 to the servo object
  11. }
  12.  
  13.  
  14. void loop()
  15. {
  16.   myservo.write(90); // Writes position 90, which in this case will be center = stop
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top