cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L0X Header files

Joel von Rotz
Associate II

Hello

I'm currently trying to create a driver for the mbed platform (especially the LPC1768, as I work with this one the most) and I wanted to know, if the following header files are actually needed:

  • windows.h
  • time.h
  • SERIAL_COMMS.h

Also, are the log files (vl53l0x_platform_log.h and vl53l0x_platform_log.cpp -> I'm using C++) and the vl53l0x_i2c_win_serial_comms.cpp needed?

3 REPLIES 3
Julien NGUYEN
ST Employee

​Hi JVR, you may try the official VL53L0X MBED code developed by ST team

https://community.st.com/s/question/0D50X0000AxD8tcSQC/vl53l0x-mbed-libraries


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Thanks for the link, but is there a way to make it compatible with the LPC1768? Is it possible to provide example programs with this library?

John E KVAM
ST Employee

​Conversion of the VL53l0X to any other processor should be easy. (But why would anyone want anything but an ST MCU? - jk) Find the point in the call chain where the VL53L0X_ReadByte actually makes calls to the MCU's I2C hardware. (Generally this is in platform.c) Refactor those calls to make calls for your MCU. It should be easy enough if you watch out for byte-swap and word-swap issues and please make sure your WriteMulti can write more than 16 bytes at a time. (Not all MCUs can do this without some help.)

There is an ST AP Note that supplies some test functions that you can use to verify your design. Once the code runs, you can remove it.

(It's all in C, but you should be able to adapt it quickly.


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question. It helps the next guy.