diff --git a/src/main.cpp b/src/main.cpp index 58b344c..ac1b478 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,9 +1,23 @@ #include +#include + +Servo yaw; +Servo pitch; void setup() { - // put your setup code here, to run once: + yaw.attach(9); // CHANGE MEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE + pitch.attach(10); // CHANGE MEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE } void loop() { - // put your main code here, to run repeatedly: + for (int pos = 0; pos <= 180; pos += 1) { + yaw.write(pos); + pitch.write(pos); + delay(15); + } + for (int pos = 180; pos >= 0; pos -= 1) { + yaw.write(pos); + pitch.write(pos); + delay(15); + } } \ No newline at end of file