I moved your post to the sensors support category since to help keep the forum organized.
Has your VL53L0X always behaved this way, and can you post some pictures of your setup that show all of your connections? What Arduino are you using to control the VL53L0X, and do you get the same results if you use both the Single.ino and Continuous.ino example programs from our library?
I didn’t take any photos regarding the connection, but I connected the AE-VL53L0X to Arduino and measured it.
What appeared was displayed when measuring 2 m or more in LongMode.
Also, the code I used is Single.ino. Then I read single.ino and the value came out.
I think that the reason why 8190 and 8191 appear is that the measurement is invalidated for some reason.
Is it possible to display the cause etc. using Arduino’s serial communication?
Also, which library does this display itself fall under?
You are correct; the readings you are seeing indicator errors. 8191 indicates a signal fail which triggers when there is too much noise in the sensor’s ranging measurement, usually from ambient light. That would be consistent with trying to measure distances of 2 meters or more since that is the upper bound of the VL53L0X sensor’s usable range. If you need to measure longer distances, you might consider our VL53L1X carrier, which can measure distances up to 4 meters.
As for the display, it sounds like you are just talking about the Arduino Serial Monitor. You could write a user program that looks at the distance measurements and sends a different message if they indicate an error if you wish. The functions for using the Arduino Serial Monitor are built into the Arduino IDE, so Arduino’s Serial reference page is probably the best resource for that.
Our library does not have a function that checks whether the distance measurements are valid readings. If you decide to modify your user code to check for that, you can probably assume at any values over 8000 are errors.