I need Micropython code examples for Nicla Vision board to measure the battery voltage and capacity. At the same time I need to use the ToF sensor, and I need examples on this. How to read ToF sensor value and battery measurement at the same. I am developing a product that needs these two info in a Mobile app. Thanks.
There’s an example for the Nicla Vision that shows how read the ToF sensor. See the sensors folder under examples.
As for battery measurement, we don’t have an example for that. However, you can lookup which I2C bus the battery gauge is attached to and roll your own driver to talk to the device. You can perform I2C reads/writes from MicroPython using the Machine or PYB module.