EasyManuals Logo
Home>ST>Control Unit>VL53L1X API

ST VL53L1X API User Manual

ST VL53L1X API
26 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #9 background imageLoading...
Page #9 background image
3.7 Ranging example pseudo code
main (void ){
/* Platform Initialization code here */
...
/* Wait for device booted */
While(state){
Status = VL53L1X_BootState(dev, &state);
HAL_delay(2);
}
/* Sensor Initialization */
Status = VL53L1X_SensorInit()
/* Modify the default configuration */
Status = VL53L1X_SetInterMeasurementPeriod();
Status = VL53l1X_SetOffset();
/* enable the ranging*/
Status = VL53L1X_StartRanging();
/* ranging loop */
While(1){
While(dataReady==0){
Status = VL53L1X_CheckForDataReady(dev, &dataReady);
}
dataReady = 0;
Status = VL53L1X_GetRangeStatus();
Status = VL53L1X_GetDistance();
Status = VL53L1X_ClearInterrupt();
}
}
UM2510
Ranging example pseudo code
UM2510 - Rev 1
page 9/26

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST VL53L1X API and is the answer not in the manual?

ST VL53L1X API Specifications

General IconGeneral
BrandST
ModelVL53L1X API
CategoryControl Unit
LanguageEnglish

Related product manuals