Advertisement
Guest User

arduino_bubble_xln_2

a guest
May 23rd, 2013
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.74 KB | None | 0 0
  1. #include <Servo.h>
  2.  
  3. Servo myservo;
  4.  
  5. int foofan = 12;  //fan pin
  6.  
  7. // the setup routine runs once when you press reset:
  8. void setup() {                
  9.   // initialize the digital pin as an output.
  10.   pinMode(foofan, OUTPUT);    
  11.   myservo.attach(9);  //servo pin
  12. }
  13.  
  14. // the loop routine runs over and over again forever:
  15. void loop() {
  16.   myservo.write(110); //dip
  17.   delay(1000);
  18.  
  19.    myservo.write(90); //drip
  20.   delay(1000);
  21.  
  22.    myservo.write(60); //foo
  23.   delay(500);
  24.  
  25.   digitalWrite(foofan, HIGH);   // turn the LED on (HIGH is the voltage level)
  26.   delay(5000);               // wait for a second
  27.   digitalWrite(foofan, LOW);    // turn the LED off by making the voltage LOW
  28.   delay(1000);               // wait for a second
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement