uploaded 5 months ago
A vl53l8cx library for esp32 using the esp-idf framework.


# VL53L8CX library for ESP32

A vl53l5cx library for esp32 using the **esp-idf framework**. This library is based
on [ST's  Ultra Lite Driver (ULD) for VL53L8CX](https://www.st.com/content/st_com/en/products/embedded-software/imaging-software/stsw-img040.html)
. 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](#Getting-started)
  * [Wiring for the SATEL-VL53L8](#wiring-for-the-satel-VL53L8)
  * [Library Installation](#library-installation-)
* [Examples](#examples-)
* [Usual Errors](#usual-errors-)
  * [Stack overflow error](#stack-overflow-error-)


## 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             | 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](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-component-manager.html) to easily import this library into your project.
To add this component to your project, run:

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

## Examples πŸ“„

You can find in `πŸ“ ./examples` ST's examples adapted for ESP32 with IΒ²C.

## 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 Config -> ESP System settings and increase the Main task stack size.

## πŸ“ License

Copyright Β© 2023 [RJRP](https://www.github.com/RJRP44).

This project is [BSD 3-Clause](https://opensource.org/licenses/BSD-3-Clause/)  licensed.

## ✨ Show your support

Give a ⭐️ if this project helped you!

## πŸ‘€ Authors

- [@RJRP](https://www.github.com/RJRP44)

readme of ranging_basic example

                                        # Ranging Basic
This example is the most basic. It initializes the VL53L8CX ULD, and starts a ranging to capture 10 frames.

By default, the vl53l8cx is configured to have the following settings :
- Resolution 4x4
- Ranging period 1Hz


Supports all targets

License: BSD-3-Clause

To add this component to your project, run:

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

or download archive


  • ESP-IDF >=5.0
  • Examples:


    more details

    To create a project from this example, run:

    idf.py create-project-from-example "rjrp44/vl53l8cx^0.1.1:ranging_basic"

    or download archive


    • Downloaded in total
      Downloaded in total 15 times
    • Downloaded this version
      This version: 1 time


    rjrp44/vl53l8cx version: 0.1.1