Vibration Monitoring using LIS3DH sensor on nRF52840

Hi Nordic team,

I hope this message finds you well. I am currently working on developing applications for custom boards utilizing the nRF Connect SDK v2.4.0, with a particular focus on the nRF52840 microcontroller.

In our ongoing project, we have a requirement to implement a feature involving Vibration Monitoring, which triggers whenever a threshold level is crossed. I have successfully interfaced the sensor and am able to obtain X, Y, and Z values using the LIS2DH drivers. However, I am encountering difficulties in implementing the vibration detection using the interrupt pin. Although I have specified the interrupt pin in the .overlay file, I am not receiving the expected output.

&i2c0 {
    lis2dh@19 {
        compatible = "st,lis2dh";
        reg = <0x19>;
		status = "okay";		
        label = "LIS3DH";
		irq-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>, <&gpio0 1 GPIO_ACTIVE_HIGH>;
		disconnect-sdo-sa0-pull-up;
    };
};

Could you please provide some sample code for reference regarding Vibration Monitoring?

Additionally, I would like to inquire if LIS3DH drivers are available, as it would be beneficial for our project.

Best regards,


Anmol

Parents Reply Children
No Data
Related