Configure imu using parameters instead of editing the source code

Choose the model and optionally custom pin numbers.
This commit is contained in:
Oleg Kalachev
2026-08-11 05:36:31 +03:00
parent 2a96f4795d
commit f79c444f07
4 changed files with 62 additions and 29 deletions
+3
View File
@@ -21,6 +21,9 @@ extern float motors[4];
Vector gyro, acc, imuRotation;
Vector accBias, gyroBias, accScale(1, 1, 1);
LowPassFilter<Vector> gyroBiasFilter(0);
int imuModel = 1, imuBus = 0;
int imuSckPin = 0, imuMisoPin = 0, imuMosiPin = 0, imuCsPin = -1, imuIntPin = -1;
int imuSdaPin = 0, imuSclPin = 0;
// declarations
void step();