Skip to content

Latest commit

 

History

History
90 lines (62 loc) · 5.17 KB

README.md

File metadata and controls

90 lines (62 loc) · 5.17 KB

VL53L8CX library for ESP32

Component Registry Uld Version

A vl53l5cx library for esp32 using the esp-idf framework. This library is based on ST's Ultra Lite Driver (ULD) for VL53L8CX v.2.0.0. This library is just an adaptation of the ST's library for esp-32.

Warning This Library is not compatible with Arduino framework

Contents 📌


Getting started

Wiring for the SATEL-VL53L8

For the examples this is the used wiring, but feel free to modify it and adapt it for your needs.

SATEL-VL53L8 Pins ESP32S3 Pins
5v 5v
1v8 NC
3v3 NC
IOVDD NC
PWREN GPIO5, 10 kΩ pullup resistor required to 3v3 if you want to use the Reset_Sensor() function, otherwise connect it to 3v3 or 5v
MCLK_SCL GPIO2, 2.2 kΩ pullup resistor required to 3v3
MOSI_SDA GPIO1, 2.2 kΩ pullup resistor required to 3v3
MISO NC
NCS 3v3
SPI_I2C_N GND
GPIO1 NC
GPIO2 NC
GND GND

Library Installation 📥

The library is available at https://components.espressif.com/components/rjrp44/vl53l8cx.

So, you can use the IDF Component Manager to easily import this library into your project. To add this component to your project, run:

idf.py add-dependency "rjrp44/vl53l8cx^2.0.0" 

Examples 📄

You can find in 📁 ./examples ST's examples adapted for ESP32 with I²C. For more information about the available features read UM3109.

Usual errors 🐛

Stack overflow error 💽

If by running an example you get a stack overflow error, this means that your main stack size is too small.

***ERROR*** A stack overflow in task main has been detected.

Increase the main stack size :

Run idf.py menuconfig. Go to Component Component config -> ESP System settings and increase the Main task stack size to at least 7168.

More parameters ⚙

In order to get more control over your sensor configuration, run idf.py menuconfig and go to Component Config -> Vl53l8cx.

In those settings you can change the number of target per zone, the timeout value, and you can disable selected output, in order to reduce I2C access.

📝 License

Copyright © 2024 RJRP.

This project is BSD 3-Clause licensed.

✨ Show your support

Give a ⭐️ if this project helped you!

👤 Authors