Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Conversion/use of CircuitPython in MicroPython

    Scheduled Pinned Locked Moved Getting Started
    circuitpython
    2 Posts 2 Posters 372 Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • I Offline
      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!

      1 Reply Last reply Reply Quote 0
      • E Offline
        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.

        1 Reply Last reply Reply Quote 2

        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
        • 1 / 1
        • First post
          Last post

        Pycom on Twitter

        Pycom