VL53L1X Distance Sensor output all over the place


I just got a new VL53L1X. I am running the sample code, without moving the Raspberry Pi it is connected to. The python script is giving me a distance every second or so, but it varies a lot. Surely it should always be the same number, since I am not moving the Raspeberry Pi?

Any ideas?


Hi @Antonio110551 - welcome to the forums :slight_smile:
What distance are you trying to measure and what’s the target material? If it’s farther than the maximum range, in sunlight, or if there is an active IR emitter in range that can cause trouble.

Are you able to post a picture of your setup + a screenshot of your coding environment with the nonsense output? Just trying to rule out any gotchas.

On the coding side of town, are you following the PiicoDev Distance Sensor Tutorial or using some other code?