Conversion/use of CircuitPython in MicroPython
ip262 last edited by
For a project I am using 4 VL53LOX short range lidar sensors. I have implemented it in Arduino, but am new to MicroPython and am unsure about the library conversion.
I found a dedicated MicroPython library, but this was a very cut down version and does not have all the commands I need.
What I'm leaning towards is a CircuitPython library found here (https://github.com/adafruit/Adafruit_CircuitPython_VL53L0X/blob/master/adafruit_vl53l0x.py).
How easy will it be to convert this from CircuitPython to work on the pycom?
Thanks in advance for any help!
Eric73 last edited by Eric73
Hi, i have a quick look at the library and it seem not a big deal to adapt it to micropython (with a litlle exeception).
IMHO you have only to change i2c read and write function call (from adafruit_bus_device.i2c_device) to pycom i2c library .
If you have a litlle knowledge about i2c bus it will be very easy for you.
BUT you have to do some change for function used with time as micropython do no provide time.monotonic, its about calibration timeout of sensor and i think you have to read documentation and change time function with some function like utime.ticks_ms() to compute timeout conditions.