adafruit / Adafruit_CircuitPython_VL53L1X

CircuitPython module for interacting with the VL53L1X distance sensor.
MIT License
8 stars 10 forks source link

Cannot set total measurement time below 100 ms #10

Closed kmatch98 closed 1 year ago

kmatch98 commented 2 years ago

I tried reducing the total measurement period below 100ms, but it had no effect.

I set to ranging mode = 1 and timing budget of 15 ms, but the intermeasurement period stayed at 100ms. (This was verified by measuring the processor ticks after each measurement.)

In the library I manually changed the init_seq to shrink the intermeasurement period to a low value as below. That reduced my measurement period to the expected 15 ms.

I suspect there is either:

Here's the hack I made to the library init_seq to speed up the measurements:

0x00,  # 0x6c : Intermeasurement period MSB, 32 bits register
0x00,  # 0x6d : Intermeasurement period
0x00, #0x0F,  # 0x6e : Intermeasurement period       ##### I hacked this line to 0x00
0x89,  # 0x6f : Intermeasurement period LSB
caternuson commented 2 years ago

Can you provide a simple test sketch that can be used to demonstrate this for testing?