I have a VL6180X sensor working with Python code and the Adafruit_VL6180X library. The sensor is static in a stand and I'm using machinist gauge blocks with a sheet of white paper to set a variable target distances.
The readings fluctuate more than I expected. I'll see up to +/- 5mm at times in continuous mode.
Also in my code is a long average (mean) total/# readings, and a 20 sample "mode", the most reoccurring measurement. Would it make sense to use the statistical Mode vs the Mean (average)? Even the mode fluctuates, so is averaging still best?
What would you recommend, what have you done to get relatively consistent measures with this or similar sensor?
The readings fluctuate more than I expected. I'll see up to +/- 5mm at times in continuous mode.
Also in my code is a long average (mean) total/# readings, and a 20 sample "mode", the most reoccurring measurement. Would it make sense to use the statistical Mode vs the Mean (average)? Even the mode fluctuates, so is averaging still best?
What would you recommend, what have you done to get relatively consistent measures with this or similar sensor?
Statistics: Posted by OldPCGuy — Fri Aug 08, 2025 6:12 pm