How to use adafruit lsm303 interrupt? I found this over the internet but i don't know how to code it in the IDE. I tried to browse the library .C and .H but i can't understand them well.

To generate an interrupt when one movement in one of the six directions is detected you have to set the following registers in the following way: INT1_CFG_A -> 0xFF

Then you can set threshold and duration through INT1_THS_A and INT1_DURATION_A register. The LSB value in the INT1_THS_A register is the following: if FS = 2 about 16mg if FS = 4 about 31mg if FS = 8 about 63mg The interrupt duration is calculate as N/ODR where N is the content of INT1_DURATION_A.