2021-09-21 11:50 PM
I used X-NUCLEO-53L5A1 + 2 VL53L5CX-SATEL, and the data read output speed has a delay in the code: HAL_Delay(POLLING PERIOD), POLLING PERIOD == 1s, and then I want to quickly, so I canceled HAL_Delay() (Picture1), But it took a long time to check (Picture2: SDA-2/SCL-2), does multi-sensor ranging reading must be delayed?
2021-10-25 03:01 PM
The sensor is going to accumulate photons for 30ms more or less based on what you have set as your Timing Budget.
That wait loop is delaying from one range to the next.
So when you get a "done', and read the answer you won't get another answer until at least the Timing Budget has passed - or the Intermeasurement Period if that's longer.
It doesn't to any good to pound the sensor asking if it's done if you know it won't be done for a while.
Better to just pause until at least most of the time has gone by before asking if it's done.