Conversion/use of CircuitPython in MicroPython
-
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!
-
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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login