cancel
Showing results for 
Search instead for 
Did you mean: 

Vl6180: Using gpio1 new_sample_ready_interrupt with singleshot mode

DBass
Associate

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?

1 REPLY 1
John E KVAM
ST Employee

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.

  • john


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.