2019-08-11 08:50 AM
Hi all
I am currently trying to integrate the VL53L0X sensor to a STM32F33R8 using CubeMX and KEIL, but I haven't had the best of luck...
I am inexperienced regarding the integration of sensors and I2C.
I have watched countless videos integrating different I2C devices to an STM using KEIL and CubeMX.
I have tried replicating Arduino library codes for this sensor, but I fail to understand what is accomplished by each function.
I have downloaded the API and API user manual. I have read the datasheet for the VL53L0X which only seems to provide me with two addresses for reading and writing (0x52 and 0x53). I have managed to send an "is device ready" command that came out true.
The datasheet seem to rely on the API library provided by ST, making it hard (or impossible for a newbie such as myself) to integrate otherwise.
Now my issue is: after downloading the API and including all c-files and header-files provided under the API folder (core and platform) I am unable to build the project and get an error message that the windows.h, Windows.h and SERIAL_COMMS.h files do not exist.
I do not understand why windows.h is needed, but it seems to complicate issues when I try to remove the #include. The SERIAL_COMMS.h sounds important and also (as expected) gives complications when removed.
I also get a strange error saying "expected a ';'" when a semicolon is already provided.
Does anyone know how to resolve this issue? Is there anyone who also struggle with this issue?
Solved! Go to Solution.
2019-08-12 01:42 AM
Hi ADP1114,
I can understand your frustration.
The VL53L0X API can be found in two software package.
The VL53L0X API (STSW-IMG005) you recently downloaded and also in the X-CUBE-53L0A1.
For your usage I suggest you to download the X-CUBE-53L0A1. Use CUBE-MX to create the STM32F33R8 project template. Complete the STM32F33R8 project with the existing example code in X-CUBE-53L0A1\STM32CubeExpansion_VL53L0X_V1.2.0\Projects\Multi\Examples\VL53L0X\RangingWithSatellites\MDK-ARM\STM32F401RE-Nucleo
I hope it helps you.
Julien
2019-08-11 11:01 AM
Windows.h suggest the app in question is PC hosted
2019-08-12 01:42 AM
Hi ADP1114,
I can understand your frustration.
The VL53L0X API can be found in two software package.
The VL53L0X API (STSW-IMG005) you recently downloaded and also in the X-CUBE-53L0A1.
For your usage I suggest you to download the X-CUBE-53L0A1. Use CUBE-MX to create the STM32F33R8 project template. Complete the STM32F33R8 project with the existing example code in X-CUBE-53L0A1\STM32CubeExpansion_VL53L0X_V1.2.0\Projects\Multi\Examples\VL53L0X\RangingWithSatellites\MDK-ARM\STM32F401RE-Nucleo
I hope it helps you.
Julien
2019-08-12 01:49 AM
Thank you so much. I will do this and verify whether it worked.
2019-08-12 05:59 AM
It builds, now I just need to implement my program in it.