SHARE
TWEET

Untitled

a guest Oct 10th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <Servo.h>
  2.  
  3. Servo meuServo;
  4.  
  5. int pos = 0;
  6.  
  7. void setup() {
  8.   meuServo.attach(9);
  9.  
  10. }
  11.  
  12. void loop() {
  13.  
  14.   for(pos = 0; pos <= 180; pos++)
  15.   {
  16.     meuServo.write(pos);
  17.     delay(15);
  18.   }
  19.  
  20.   for(pos = 180; pos >= 0; pos--)
  21.   {
  22.     meuServo.write(pos);
  23.     delay(15);
  24.   }
  25.  
  26. }
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
 
Top