rosmo-robot / smartcar_shield

A versatile and easy to use vehicle platform
https://rosmo-robot.github.io/
MIT License
8 stars 0 forks source link

Support LIS3DH #3

Closed samuk closed 1 year ago

samuk commented 1 year ago

Description

https://github.com/rosmo-robot/smartcar_shield/tree/master/src/sensors/heading Add LIS3DH support to the lib

Definition of Done

Sensor data from LIS3DH is available

platisd commented 1 year ago

This one seems more tricky as the sensor's output is in m/s^2 and not in degrees. This means that some maths are needed and I am not personally interested in trying to figure that part out. Also, if I am not mistake this is only an accelerometer meaning that it is not good or suitable for determining the heading of a vehicle.

samuk commented 1 year ago

Hmm, thanks. We included this ~$1 component without a great deal of research. It may be better to replace it with a ~$3 L3G4200D or MPU6050. I'll go and investigate a hardware change.

Gyro vs accelerometer

Looking at Adafruit Gyro

$3.60 MPU6500

$3 LSM6DSOTR (is this the same as LSM6DSOX?) There is code for the LSM6DSOX https://www.adafruit.com/product/4438