Skip to main content
DMehr.2
Associate II
March 22, 2022
Question

I get the same histogram data every time on VL53l3cx

  • March 22, 2022
  • 2 replies
  • 766 views

As shown below, the first line is the distance and the rest are histogram data whci I think is same and not correct?

103

-4652409,-2097499426,1344930034,1327221713,525211626,33064954,-17059034,235676156,1093868795,138478570,-1947005701,2044266306,-979944,-1949171152,-370016190,-918125440,-1313692902,250674939,1125191931,138674666,-1594359557,1020856133,-983015,-1596849613,

85

-4652409,-2097499426,1344930034,1327221713,525211626,33064954,-17059034,235676156,1093868795,138478570,-1947005701,2044266306,-979944,-1949171152,-370016190,-918125440,-1313692902,250674939,1125191931,138674666,-1594359557,1020856133,-983015,-1596849613,

80

-4652409,-2097499426,1344930034,1327221713,525211626,33064954,-17059034,235676156,1093868795,138478570,-1947005701,2044266306,-979944,-1949171152,-370016190,-918125440,-1313692902,250674939,1125191931,138674666,-1594359557,1020856133,-983015,-1596849613,

This is the code snippet I am using

 VL53LX_GetAdditionalData(VL53L3A2_DEV_CENTER,pAdditionalData);
 							for (int j=0;j<24;j++){
 								printf("%ld,", pAdditionalData->VL53LX_p_006.bin_data[j]);
 							}
 							printf("\n");
 

This topic has been closed for replies.

2 replies

John E KVAM
ST Employee
March 25, 2022

There is no way to get the same data if in fact you are ranging. For some reason you stopped ranging.

You should call

VL53LX_GetMeasurementDataReady() - this will stall until the data is ready

Check the RangeStatus to insure you got a good range

VL53LX_GetAdditionalData() this will get the histogram data.

VL53LX_ClearInterruptAndStartMeasurement() - to start the next range.

if your VL53LX_GetAdditionalData() continues to return the same data, you have not completed the next range.

DMehr.2
DMehr.2Author
Associate II
March 27, 2022

I think the problem might lie in me using the VL53L3A2_DEV_CENTER as I think it has the value 0 and not the proprer address which is required? I have trouble finding what to use instead of that. Could you maybe point me in the right direction? I am using the eval board and fr401e board for this.