Created
April 29, 2017 04:26
-
-
Save tps2015gh/669097e6e41b99126f6ebc90a9c79b70 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
/*** | |
Author: Thitipong Samranvanich | |
Since: 2017 | |
Copyright 2017 | |
*/ | |
#include <Servo.h> | |
Servo myservo; | |
void setup() | |
{ | |
myservo.attach(9); | |
} | |
void loop() | |
{ | |
int max_degree = 30 ; | |
// for ( int i = 0 ; i < max_degree ; i += 10 ) { | |
// myservo.write(i); | |
// delay( 50 ); // 0.5 sec | |
// } | |
myservo.write(max_degree); | |
delay(300) ; //0.5sec | |
myservo.write(0); | |
// DELAY FOR TEST , FEED FOOD | |
unsigned long hour1 = 3600000; | |
unsigned long min1 = hour1 / 60 ; | |
unsigned long sec1 = 1000 ; | |
delay( 5 * sec1 ); | |
//delay(300*1000); // 20 sec | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment