Skip to content

Commit 82c4866

Browse files
committed
Fixes
1 parent 38d1593 commit 82c4866

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

arduino_sketch/Config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
#define NOVAL 1000
4848

49-
// #define MPU6050_ENABLED // Enable MPU6050
49+
#define MPU6050_ENABLED // Enable MPU6050
5050
//#define MPU6050_DEBUG // Debug in serial plotter
5151
#define ANIMATE_ENABLED // Enable random animations
5252

@@ -70,7 +70,7 @@ int PosRest[SERVO_COUNT] = {60, 0, 165, 120, 180, 10, 90, 90};
7070
int PosConfig[SERVO_COUNT] = {90, 90, 90, 90, 90, 90, 90, 90};
7171

7272
// Poses
73-
int PosStand[SERVO_COUNT] = {45, 75, 95, 135, 105, 85, NOVAL, NOVAL};
73+
int PosStand[SERVO_COUNT] = {45, 75, 90, 135, 105, 90, NOVAL, NOVAL};
7474
int PosLookLeft[SERVO_COUNT] = {NOVAL, NOVAL, NOVAL, NOVAL, NOVAL, NOVAL, NOVAL, 180};
7575
int PosLookRight[SERVO_COUNT] = {NOVAL, NOVAL, NOVAL, NOVAL, NOVAL, NOVAL, NOVAL, 0};
7676
int PosLookRandom[SERVO_COUNT] = {NOVAL, NOVAL, NOVAL, NOVAL, NOVAL, NOVAL, -1, -1}; // Made random by calling the function moveRandom() if the value is -1

arduino_sketch/arduino_sketch.ino

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ void setup()
4545
bootTime = millis();
4646
// Init serial
4747
Serial.begin(115200);
48-
// Init ServoManager
49-
servoManager.doInit();
50-
servoManager.setSpeed(SERVO_SPEED_MIN);
5148

5249

5350
pinMode(backpackPin, INPUT_PULLUP); // sets the digital pin as input
@@ -64,6 +61,10 @@ void setup()
6461
restrainingBolt = true;
6562
}
6663

64+
// Init ServoManager
65+
servoManager.doInit();
66+
servoManager.setSpeed(SERVO_SPEED_MIN);
67+
6768
#ifdef MPU6050_ENABLED
6869
tilt.doInit();
6970
#endif
@@ -158,6 +159,7 @@ void hipAdjust()
158159
tilt.read();
159160
//Serial.println(tilt.getPitch());
160161
servoManager.hipAdjust(tilt.getPitch());
162+
setEaseToForAllServosSynchronizeAndStartInterrupt(servoManager.getSpeed());
161163
}
162164
#endif
163165

0 commit comments

Comments
 (0)