Created
October 30, 2020 12:49
-
-
Save ulitiy/a2b55c8d6ff86dca5956551208b76921 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Servo.h> | |
Servo myservo; | |
const int servoPin = 9; | |
const int ledPin = 13; | |
void setup() { | |
myservo.attach(servoPin); | |
pinMode(ledPin, OUTPUT); | |
digitalWrite(ledPin, LOW); | |
myservo.write(180); | |
delay(1000); | |
myservo.detach(); | |
} | |
void loop() { | |
myservo.attach(servoPin); | |
myservo.write(30); | |
delay(575); | |
myservo.write(180); | |
delay(1500); | |
myservo.detach(); | |
delay(3600000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Where to change the code when the interval is 4 hours