Tof vl53l0x arduino Nicla vision freeze

Hi everyone,
I have some troubles with the Tof VL53l0 and perhaps the micopython lib.
After few minutes at low refresh frequency (1Hz) the value freeze.
Do you have a solution for this ?

Hi, I can confirm the default example code for the sensor works on the Arduino Nicla.

# This work is licensed under the MIT license.
# Copyright (c) 2013-2023 OpenMV LLC. All rights reserved.
# https://github.com/openmv/openmv/blob/master/LICENSE
#
# VL53L1X ToF sensor basic distance measurement example.
from machine import I2C
from vl53l1x import VL53L1X
import time

tof = VL53L1X(I2C(2))

while True:
    print(f"Distance: {tof.read()}mm")
    time.sleep_ms(50)

How is your setup different?

Hi, I’m using exactly the same code of you.
Is there a special way to modify the vl53l1x configuration ?

No, if you are using the latest firmware it should just work. Did you remove the tape on top of the sensor? This would cause false readings. However, I didn’t notice any crashing issues.

yes, I evidently remove the tape.
I see the vl53l1x class in openmv librairies with DEFAULT_CONFIGURATION. Can I modify it to change the clock frequency ?