Using the accelerometer


Along with the DecaWave DWM1001 module, the Yahu embeds an STM LIS2DH12TR triple-axis accelerometer connected to the MCU using an I2C bus.


In the Arduino ecosystem, the accelerometer works out-of-the-box using the DFRobot_LIS2DH12 library.

  1. Download the DFRobot_LIS2DH12 library,
  2. Open the testLIS2DH12.ino example,
  3. Add parameter 0x19 on LIS.init() call: while(LIS.init(LIS2DH12_RANGE_16GA, 0x19) == -1) {
  4. 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.

What's on this Page