cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L0X API usage guidelines

NSing.5
Senior

I've tried to use VL53L0X API, but it is too confusing. The API package STSW-IMG005 lacks any proper guidelines how to use API. The source file vl53l0x_platform results in one or another error.

i'm unable to my own code VL53L0X as register map is not properly available in datasheet.

Tried to explore discussion forums but unable to find any relevant solution.

The problem i'm experiencing with API is How to link I2C write and Read operations with API function calls

Kindly guide me.

i'm using STM32F103 and IAR workbench.

Regards

1 ACCEPTED SOLUTION

Accepted Solutions
Anne BIGOT
ST Employee

You can find a working environment at https://github.com/lamik/VL53L0X_API_STM32_HAL/blob/master/Drivers/VL53L0X/platform/src/

I performed a Google search for STM32 VL53L0X GitHub where I found this example. Please give this a try.

The link is also logged in this ticket :

https://community.st.com/s/question/0D53W00000QQ5GxSAL/where-to-locate-missing-windowsh-files-for-vl53l0x-api

Regards


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'

View solution in original post

4 REPLIES 4
Anne BIGOT
ST Employee

You can find a working environment at https://github.com/lamik/VL53L0X_API_STM32_HAL/blob/master/Drivers/VL53L0X/platform/src/

I performed a Google search for STM32 VL53L0X GitHub where I found this example. Please give this a try.

The link is also logged in this ticket :

https://community.st.com/s/question/0D53W00000QQ5GxSAL/where-to-locate-missing-windowsh-files-for-vl53l0x-api

Regards


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'

thanks for your suggestion finally its working.

i'v one more question. with the default settings i'm able to measure only upto 150mm.

i want to switch to long range mode, which function is to be used for this purpose

regards

Hello,

Please have a llok in the User Manual here

You will see how to switch from one range to another.

Regards

Anne


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'

You can find a working environment at https://github.com/lamik/VL53L0X_API_STM32_HAL/blob/master/Drivers/VL53L0X/platform/src/

while (1)
{
VL53L0X_PerformSingleRangingMeasurement(Dev, &RangingData);

if(RangingData.RangeStatus == 0)
{
MessageLen = sprintf((char*)Message, "Measured distance: %i\n\r", RangingData.RangeMilliMeter);
HAL_UART_Transmit(&huart2, Message, MessageLen, 100);
}

 

continuously going in if condition and showing Measured distance : 0 , continuously on log terminal without showing any error

kindly guide me