Nicla Vision ToF Sensor Driver

I assume the built-in vl53l1x driver is baked into the MicroPython firmware. Is there any reason I wouldn’t be able to use a much more developed version of the driver, like this one (which I grabbed from SparkFun): ToF Driver

I would like to use some of the nicer facilities of the sensor (like setting its ROI), and while I can duplicate all the code in the driver to write to registers directly, it seems like it would be a lot less work to just copy that library (with the name changed so it doesn’t interfere with the built in one) and use it.

Do you see any issues with that?

Yeah, just put it on your disk and you’ll be good to go. You can import modules as you like.

Just make sure it has a different name than the built in one. Built in modules are picked first versus searching the disk.

1 Like