#VL6810X continuous measurement lifecycle

1 messages · Page 1 of 1 (latest)

timid spear
#

Anyone experienced in Circuitpython and the behavior of the VL6810X in continuous measurement mode?

I have my base implementation working nicely, but I am now thinning out the code for better runtime and move various pieces into Asyncio for some concurrency of various features.

I make a chain of measurements from the VL6810X in continuous mode, using start_range_continuous(20) and then calls to range() which I understand under the covers polls for the measurement complete bit, and then returns the value.

Lets say I call that 16 times in a loop, I am sat waiting for 20 x 16 = 320 ms

What I want to know ( and can likely confirm / deny through experimentation ) Is if I set continuous mode, and then go off and do something else, coming back in 320ms + and read from

ranges_from_history() will those be the last 16 reads that have occurred against my convergance time while I have been off doing something else?

I guess I will go experiment anyway, but its always great to have any benefit of experience out there...

Even typing this up gives me inspiration on how to experiment.

timid spear
#

Just to answer my own question, indeed, letting continous mode run, and then reading ranges_from_history which is a property, not a function, I can see I get a full set of 16 unique readings, for only 25 ms overhead, which will leave me with a lot of runtime to split out, I still need to schedule time between reads, but can lean into asyinc

timid spear
#

Well that is unexpected. The VL6180X that was showing lock up after 30 minutes, no longer responds on i2c at all, getting device ID not present at start up!

Swapped out for another VL6180X and it is running fine, so maybe I will have a VL6180X board to return as well as the broken TFT screens I recently recieved 😦