EasyManua.ls Logo

ST VL53L1X API - Ranging Example Pseudo Code

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
Loading...
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

Related product manuals