I have a basic implementation working with an interrupt based on the readings being in a specified range.
However, I am running into an issue - the Sparkfun Library is missing two functions that that are part of the ST API.
https://cdn.sparkfun.com/assets/e/1/8/4 … 1X_API.pdf
In the ST user manual on page 13, these are the parameters to set for range threshold:
Example:
Detectionconfig.DetectionMode = 1
Detectionconfig.Distance.CrossMode = 3
Detectionconfig.IntrNoTarget = 0
Detectionconfig.Distance.High = 1000
Detectionconfig.Distance.Low = 100
Status = VL53L1_SetThresholdConfig(&VL53L1Dev, &detectionConfig );
This function is used to program the device to report ranging only when an object is detected within 10 cm and 1 m (as in this example).
The function VL53L1_GetThresholdConfig() allows the programmed report threshold configuration to be obatined.
There are two items in this configuration that are missing in the SparkFun library : IntrNoTarget and DetectionMode
Without these two, there are a large number of “false” interrupts where the interrupt is raised but there is not a measurement in the designed range.
Any ideas on how we could add this to the library? Has anyone else done this? As is pointed out already, there is not direct access to the device’s registers.
Thanks,
Chip