Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Servo.h>
- Servo myservo;
- int foofan = 12; //fan pin
- // the setup routine runs once when you press reset:
- void setup() {
- // initialize the digital pin as an output.
- pinMode(foofan, OUTPUT);
- myservo.attach(9); //servo pin
- }
- // the loop routine runs over and over again forever:
- void loop() {
- myservo.write(110); //dip
- delay(1000);
- myservo.write(90); //drip
- delay(1000);
- myservo.write(60); //foo
- delay(500);
- digitalWrite(foofan, HIGH); // turn the LED on (HIGH is the voltage level)
- delay(5000); // wait for a second
- digitalWrite(foofan, LOW); // turn the LED off by making the voltage LOW
- delay(1000); // wait for a second
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement