2019-10-09 05:41 AM
I'm using LIS2DH12 and trying to implement 6d movement detection.
Below is my present flow on startup.
But the interrupt is not getting generated when there is a movement.
2019-10-11 07:15 AM
Hi @Madhusudhan K , try with the indications in the LIS2DH12 app note (AN5005 p. 28). Are you interested in 6D position or in 6D movement recognition? You can btw try with this pseudocode:
1. Write 57h into CTRL_REG1 // Turn on the sensor, enable X, Y, and Z // ODR = 100 Hz
2. Write 00h into CTRL_REG2 // High-pass filter disabled
3. Write 40h into CTRL_REG3 // Interrupt activity 1 driven to INT1 pad
4. Write 00h into CTRL_REG4 // FS = ±2 g
5. Write 08h into CTRL_REG5 // Interrupt 1 pin latched
6. Write 21h into INT1_THS // Set 6D movement threshold = 515mg (higher than yours at 250mg)
7. Write 03h into INT1_DURATION // Set minimum event duration (lower than yours)
8. Write 4Ah into INT1_CFG // Configure 6D movement recognition on the X and Y-axis
9. Poll INT1 pad; if INT1 = 0 then go to 10 // Poll INT1 pin waiting for the free-fall event
10. (6D movement recognition event has occurred; insert your code here) // Event handling
11. Read INT1_SRC register // Clear interrupt request
12. Go to 9
Regards
2019-10-16 06:52 AM
Hi,
I'm looking for 6D movement recognition.
I have tried your flow but I'm not getting any interrupt on the INT1 pin.