pololu / vl53l0x-arduino

Pololu Arduino library for VL53L0X time-of-flight distance sensor
https://www.pololu.com/product/2490
Other
346 stars 162 forks source link

float value in readRangeContinuousMillimeters #55

Closed rorkyendo closed 2 years ago

rorkyendo commented 2 years ago

hi i had to get floating value in milimeters like 35.40mm or 45.30mm but this sensor only getting in integer value like 35mm and 45mm

did this sensor working in floating value?

kevin-pololu commented 2 years ago

By default, the VL53L0X gives measurements with a resolution of 1 mm. ST's VL53L0X API includes a RangeFractionalEnable setting that suggests you might be able to get a smaller resolution, but I have not been able to find much documentation about this setting, and at the moment we have no plans to support it in this library. If you want to try using the ST API directly to get fractional readings, you might try asking on the ST Community site for help.