Question
LIS2DH12 Movement Interrupt configuration
Posted on October 03, 2016 at 18:31
Good morning, I'm having a heck of a time trying to get my configuration settings correct on my LIS2DH12 Accelerometer.
I would like it to fire the interrupt when an abrupt movement occurs on any or all axes.I have some settings (below) that I'm trying, but it seems too sensitive and sometimes fires the interrupt when it's just sitting there not moving at all. Seems like there are too many interrelated settings on this, but that's the nature of the beast. Has anybody got some settings that work well to detect movement on any/all axes ? The way I understand it is that Threshold is the amount of movement and Duration is the time frame in which that movement occurs. So a short time frame and a large threshold should indicate an abrupt movement?Any assistance on this would be GREATLY appreciatedAnyway, here are the settings I'm currently using:&sharpdefine ACCL_CTRL_REG1_DEFAULT 0x37 &sharpdefine ACCL_CTRL_REG2_DEFAULT 0x01&sharpdefine ACCL_CTRL_REG3_DEFAULT 0x06&sharpdefine ACCL_CTRL_REG4_DEFAULT 0x98&sharpdefine ACCL_CTRL_REG5_DEFAULT 0x41&sharpdefine ACCL_CTRL_REG6_DEFAULT 0x20&sharpdefine ACCL_INT1_CFG_DEFAULT 0x7F &sharpdefine ACCL_INT1_SRC_DEFAULT 0x00 &sharpdefine ACCL_INT1_THS_DEFAULT 0x04&sharpdefine ACCL_INT1_DUR_DEFAULT 0x00 &sharpdefine ACCL_INT2_CFG_DEFAULT 0x7F &sharpdefine ACCL_INT2_SRC_DEFAULT 0x10 &sharpdefine ACCL_INT2_THS_DEFAULT 0x04&sharpdefine ACCL_INT2_DUR_DEFAULT 0x00 #accelerometer-lis2dh12-configure