Skip to content

Commit 74a993b

Browse files
committed
breaking: movement: use LSM6DSO sensor
1 parent 24a640e commit 74a993b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/Modulino.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "Wire.h"
22
#include <vector>
33
#include <vl53l4cd_class.h> // from stm32duino
4-
#include "Arduino_BMI270_BMM150.h"
4+
#include "Arduino_LSM6DSOX.h"
55
#include <Arduino_LPS22HB.h>
66
#include <Arduino_HS300x.h>
77
//#include <SE05X.h> // need to provide a way to change Wire object
@@ -338,12 +338,9 @@ class ModulinoMovement : public Module {
338338
public:
339339
bool begin() {
340340
if (_imu == nullptr) {
341-
_imu = new BoschSensorClass(*((TwoWire*)getWire()));
341+
_imu = new LSM6DSOXClass(*((TwoWire*)getWire()), 0x6A);
342342
}
343343
initialized = _imu->begin();
344-
if (initialized) {
345-
_imu->setContinuousMode();
346-
}
347344
return initialized != 0;
348345
}
349346
int update() {
@@ -362,7 +359,7 @@ class ModulinoMovement : public Module {
362359
return z;
363360
}
364361
private:
365-
BoschSensorClass* _imu = nullptr;
362+
LSM6DSOXClass* _imu = nullptr;
366363
float x,y,z;
367364
int initialized = 0;
368365
};

0 commit comments

Comments
 (0)