Brief
Along with the DecaWave DWM1001 module, the Yahu embeds an STM LIS2DH12TR triple-axis accelerometer connected to the MCU using an I2C bus.
Arduino
In the Arduino ecosystem, the accelerometer works out-of-the-box using the DFRobot_LIS2DH12 library.
- Download the DFRobot_LIS2DH12 library,
- Open the
testLIS2DH12.inoexample, - Add parameter
0x19onLIS.init()call:while(LIS.init(LIS2DH12_RANGE_16GA, 0x19) == -1) { - Compile, flash and play with the Serial Monitor or the Serial Plotter.
The measurement range can be adjusted in the init(): LIS2DH12_RANGE_2GA, LIS2DH12_RANGE_4GA, LIS2DH12_RANGE_8GA or LIS2DH12_RANGE_16GA.