2021-03-30 11:53 PM
Hello,
I am using the Vl6180 in continuous mode. The gpio1 was configured as a rising edge. An interrupt is triggered when a new sample is ready.
I'm trying to use the gpio1 for singleshot mode. Unfortunately so far without success.
Who has experience with it, or is the gpio1 only intended for continuous mode?
2021-03-31 08:23 AM
There is an API for single shot - VL6180x_RangePollMeasurement(). As the name implies, it starts the measurement, polls for done, then reads the result and returns it.
But I suspect this is not what you wanted.
Would you consider?
Starting in continous ranging mode,
After you get the first interrupt and result, simply issuing the 'stop' command?
In effect you would have created a single shot mode.
I suspect that would do exactly what you wanted to accomplish.