Hello
I have a problem with setting LIS3DH and it literally starts to drive me crazy.
What I want it to achieve is to configure it to set pin INT1 down when the device experiences an acceleration change of 32mg lasting for 0.5s.
Basically I want it to detect movement.
Here are my settings:
CTRL_REG1 = 0x20 //10Hz, normal power mode, ZXY enable
CTRL_REG2 = 0x00 //no HP filters
CTRL_REG3 = 0x40 //IA1 enable
CTRL_REG4 = 0x10 //scale 4g
CTRL_REG5 = 0x08 //interrupt 1 pin latched
INT1_THS = 0x01 //32mg threshold
INT1_DURATION = 0x05 // 0.5s to activate interrupt
INT1_CFG = 0x7F //6D direction mode enabled, all directions enabled
Then I read INT1_SRC register every second and probe the INT1 pin with the scope. The result is that INT1_SRC is always 0 and INT1 never goes down.
Funny thing is that when I change the threshold from INT1_THS = 0x01 to at least INT1_THS = 0x0A everything seems to work OK.
What am I doing wrong? Why isn't it working with lower thresholds?
Thanks in advance.