cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L8CX SATEL use with Arduino Or ESP32?

MCham.8
Associate

Does anyone know if the VL53L8CX SATEL can be used with an Arduino board (just for testing)? Or ESP32? I've tried the basic wiring I have done for other breakouts, but it doesn't work.

 

If so, please share how it should be wired. Also, I have used very similar code on 1CB, 1CX, and the 4CX. Anyone know if that would work for the L8?

5 REPLIES 5
John E KVAM
ST Employee

The VL53L5, L7 and L8 are multi-zone sensors. Instead of getting 1 distance per range, you get 64 of them. And if you want signal strengths, multiple targets per zone and other information you can get some like 6000 bytes of return data every 15th of a second. It's a lot.

And it does download the firmware into the sensor at startup. That's some 83Kbytes.

This is getting pretty large for a little processor.

But it can be done.

you need to have the I2C select pin grounded, and the LPn pin raised. You need power and I2C. Interrupt is helpful - but not required.

The easy way is to wait. Sparkfun is soon to release just what you want.

This sensor works the same way is all our other VL53 products. It's your job to complete the platform.c for your processor. This file is the interface to the MCU's I2C. As delivered it's empty. But if you've already done the L1 or L4, it should be easy to adapt.

So providing your MCU is big enough, it will work.


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.

And what about his SPI interface ?

thx

Equally confused about this. There seems to be plenty of configuration support for the I2C interface, but I have yet to find anything that supports the SPI interface.

VL53L8CX can be used either with I2C communication or SPI communication.

This is the first product for Time Of Flight that supports both communications.

You can find some example code within the SW package of the VL53L8CX : STSW-IMG040


Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'

Edit: I have started a new thread with my question here. 

Anne, thank you for the response. I have been using the example code as a guide already, but I think the information pertains to `platform.h`. Are there any required settings (like setting an address for I2C) for setting up the SPI? I see that there is a `uint8_t spi_comm_buffer[32800]`, as a minimum buffer size, but changing this doesn't seem to have an effect.

I ask because when calling `vl53l8cx_start_ranging()`, the call to `vl53l8cx_dci_read_data()` returns a status error of 1, and a few lines down

 

(void)memcpy(&tmp, &(p_dev->temp_buffer[0x8]), sizeof(tmp));
if(tmp != p_dev->data_read_size)
{
status |= VL53L8CX_STATUS_ERROR;
}

 

triggers every time and returns 255. I do not know enough about the buffers to find the bug. Happy to start a new post if this is too unrelated.