LIS2MDL: Is it possible to set different low and high interrupt threshold?
Hello,
I am working on a project using the LIS2MDL magnetometer sensor to build a smart parking device that detects the presence of a car based on the x-axis readings exceeding an interrupt threshold.
Currently, I face an issue with setting high and low thresholds for the interrupt. For example, if I set the high threshold to +30 and the low threshold to -30, and the x-axis reading is around 1400 mG, the interrupt remains consistently high. This makes it difficult to reset and detect new threshold crossings.
Is it possible to dynamically adjust the thresholds based on the initial raw data reading from the x-axis? For instance, could I configure the device to read the raw x-axis value during initialization and then set the high threshold to x_axis_val + 100 and the low threshold to x_axis_val - 100?
I’d appreciate any guidance or suggestions.
