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


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question. It helps the next guy.