cancel
Showing results for 
Search instead for 
Did you mean: 

Hi i need help. I have a B-L475E-IOT01A with a sensor vl53l0x. I try to use the library img005 but i'm not able to read with this the distance by the sensor. Someone have an example of main to do it? I have also difficult with the vl53l0x platform lib

Dcapu.2440
Associate II
 
1 REPLY 1
John E KVAM
ST Employee

​The first thing you have to do is establish communication over the I2C. The I2C spec is somewhat confusing until you get used to it. Best to find an I2C example for your processor.

The libraries provided with the VL53L0X only go as far as making the I2C_read and I2C_write calls leaving you to make the connection between the I2C calls and your hardware. That's why the Platform.c file is left pretty much empty.

(ST sells it's own microprocessors - and they are not pleased when we support the competition. So we chose to simply make you do it.)

Most MCU vendors will have good examples however.

If you look into the STSW-img005 directory you should see some examples.

I like vl53l0x_SingleRanging_Example.c

It should get you started - I'd just use that.

  • john

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.