Skip to main content
Visitor II
October 25, 2024
Solved

How to change data for VL53L8CX sensor

  • October 25, 2024
  • 1 reply
  • 673 views

Hey, I am a beginner in all of this and have been trying to change certain parameters for my VL53L8CX sensor such as sharpening percentage, or converting its standard mm data unit to feet or inches, and I really can not figure it out. I am guessing its inside of the vl53l8cx_api.c file but I cant figure out where to, i am assuming, call a function with the new numbers passed into it. I see the get and set functions for each parameter but I don't think you change it in there? Thanks for the help, I am sure its silly question.

Best answer by John E KVAM

Get and Set are exactly how you set the parameters. For example

 status |= vl53l8cx_get_sharpener_percent(p_dev, &sharp_prct);
 status |= vl53l8cx_set_sharpener_percent(p_dev, sharp_prct);
    status |= vl53l8cx_get_sharpener_percent(p_dev, &sharp_prct);
    status |= vl53l8cx_set_sharpener_percent(p_dev, sharp_prct);
These were taken from the VL53L8cx_plugin_xtalk. 
You would be calling these from your program after you call the initialization and before you issue the start command. 

1 reply

John E KVAM
John E KVAMBest answer
ST Employee
October 25, 2024

Get and Set are exactly how you set the parameters. For example

 status |= vl53l8cx_get_sharpener_percent(p_dev, &sharp_prct);
 status |= vl53l8cx_set_sharpener_percent(p_dev, sharp_prct);
    status |= vl53l8cx_get_sharpener_percent(p_dev, &sharp_prct);
    status |= vl53l8cx_set_sharpener_percent(p_dev, sharp_prct);
These were taken from the VL53L8cx_plugin_xtalk. 
You would be calling these from your program after you call the initialization and before you issue the start command.