@Gordon
Here is a version of VL53L0X module with some small additions. It is compiled from a few working parts but not tested (I have no device now). In any case, additions from previous version are very small so I do not think there are too many bugs here.
Main problem with readRangeSingleMillimeters() - it can not work after setGPIOConfig (1) - GPIO mode set to on when low threshold is crossed.
I have not checked accurately if performSingleMeasurement() can still work - it waits for another flag in 'while'. May be that flag is better and may be it will be better to change readRangeContinuousMillimeters() to use the flag.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
@Gordon
Here is a version of VL53L0X module with some small additions. It is compiled from a few working parts but not tested (I have no device now). In any case, additions from previous version are very small so I do not think there are too many bugs here.
Main problem with readRangeSingleMillimeters() - it can not work after setGPIOConfig (1) - GPIO mode set to on when low threshold is crossed.
I have not checked accurately if performSingleMeasurement() can still work - it waits for another flag in 'while'. May be that flag is better and may be it will be better to change readRangeContinuousMillimeters() to use the flag.
1 Attachment