2021-04-15 08:58 PM
2021-04-28 07:46 AM
The platform.c as delivered communicates from the sensor to your PC. It's not what you want. You want to commicate from the sensor to your MCU.
So the trick is to completely gut that file, leaving only the function calls. Then re-write the functions to communicate with the I2C functions of your MCU.
It's kind of a pain.
I'd go to GitHub and do a search for the VL53L and your MCU. Lots of people post and all of them have done this before you.
Another way to go - if you are using an STM32 is download the code for the VL53L1X UltraLite Driver. It has in it an example project. That example project contains a VL53L1X_Platform.c
You can adapt that platform.c to you your VL53L0_platform.c