Performing range measurements AN4545
6/27 DocID026571 Rev 1
2 Performing range measurements
After the settings have been loaded, range measurements can be started in one of two
modes, Single-shot mode and Continuous mode.
In Single-shot mode, the VL6180X will perform a single range measurement and will enter
software standby once the measurement has completed.
In continuous mode the VL6180X will perform back to back range measurements at a user
determined rate until the stop command is issued. Section 2.1 and Section 2.2 outline the
recommended procedure on performing a range measurements. Section 7 contains
example code on how to initialise the device and perform range measurements with the
sensor.
Figure 4. Flowchart for performing range measurements
Device ready for
range measurement
Ranging
mode
Start a ranging
measurement. Write
0x01 to {0x18}
Poll for New Sample
Ready threshold
event at {0x4f}
Read {0x62} for
range result
Clear Interrupt
Write 0x07 to {0x15}
Device ready for
range measurement
Start range
measurements.
Write 0x03 to {0x18}
Poll for New Sample
Ready threshold
event at
{0x4f}
Read {0x62} for
range result
Continue
ranging?
Stop ranging.
write 0x01 to {0x18}
No
Yes
Single-shot
Clear Interrupt
Write 0x07 to {0x15}
Continuous