Skip to main content
Visitor II
March 31, 2021
Question

Vl6180: Using gpio1 new_sample_ready_interrupt with singleshot mode

  • March 31, 2021
  • 1 reply
  • 679 views

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?

    This topic has been closed for replies.

    1 reply

    ST Employee
    March 31, 2021

    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