VL53L1X ToF Laser Distance Sensor - Getting Started (MicroPython)
MicroPython library
To upload VL53L1X MicroPython module onto your board you can use Thonny IDE or mpremote:
VL53L1X Laser Distance Sensor MicroPython Library
Laser Distance Sensor MicroPython library by Soldered
Installing using mpremote
To use mpremote first install the mpremote package, connect the board to your computer and then upload the module to the board using the following command:
python -m mpremote mip install github:SolderedElectronics/Soldered-Micropython-modules/Sensors/LaserDistanceSensor
Installing using Thonny IDE
- Connect your board to computer with USB
- Open Thonny, select the correct interpreter
- Tools > Options > Interpreter
- Select MicroPython (Raspberry Pi Pico / ESP32 / ...)
- Choose correct port and click OK
- Open the
modules/folder from MicroPython Modules - For each module:
- Open the
.pyfile in Thonny - Go to File > Save as...
- Choose MicroPython device
- Save the file inside the
/lib/directory on the device (create it if it doesn't exist)
- Open the
- Once the module is uploaded on your board, you can import it just like any other module:
from VL53L1X import VL53L1X
ℹ️
New to MicroPython? Check out our MicroPython overview to get started:
MicroPython Overview
Getting started with MicroPython guide