1
0
mirror of https://gitlab.com/lander-team/tvc-test-code.git synced 2025-06-16 15:06:56 +00:00

simple servo boilerplay

This commit is contained in:
Anson Biggs 2021-11-02 12:16:11 -07:00
parent d6aa7602a1
commit df0f021473

View File

@ -1,9 +1,23 @@
#include <Arduino.h>
#include <Servo.h>
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);
}
}