light = Timer(2, freq=50000).channel(1, Timer.PWM, pin=Pin("P6"))
light.pulse_width_percent(10) # 控制亮度 0~100
i2c = I2C(2)
distance = VL53L1X(i2c)
这几句放在死循环上面去,不然循环初始化就会慢。