1
0
mirror of https://gitlab.com/lander-team/lander-cpp.git synced 2025-08-02 11:31:34 +00:00

intrgrate servos

This commit is contained in:
2021-11-22 13:30:53 -07:00
parent 7a523bab6d
commit d4e2d0162e
2 changed files with 44 additions and 36 deletions

View File

@@ -26,12 +26,8 @@ unsigned long last, initTime;
#include <HX711.h>
#include <PWMServo.h>
PWMServo servo1;
PWMServo servo2;
const int pin_servo1 = 33;
const int pin_servo2 = 29;
const int pin_igniter = 7;
PWMServo yaw;
PWMServo pitch;
int servoPos = 90; // variable to store the servo position;
@@ -48,9 +44,9 @@ void setup() {
initLoadCells(State);
init_Vehicle(State);
servo1.attach(pin_servo1);
servo2.attach(pin_servo2);
testGimbal(servo1, servo2);
yaw.attach(29);
pitch.attach(33);
testGimbal(yaw, pitch);
Serial.println("Servos Tested");
delay(3000);
@@ -75,7 +71,7 @@ void loop() {
thrustInfo(State);
pidController(State, PrevState);
TVC(State, PrevState);
processTVC(State, servo1, servo2);
processTVC(State, yaw, pitch);
write2CSV(State);