|
IoT-MBBR (masterthesis)
Masterthesis upgrading a Moving Bed BioReactor with extra sensors and cloud connectivity.
|
Go to the source code of this file.
Functions | |
| VL53L1X_ERROR | VL53L1X_GetSWVersion (VL53L1X_Version_t *pVersion) |
| This function returns the SW driver version. More... | |
| VL53L1X_ERROR | VL53L1X_SetI2CAddress (uint16_t dev, uint8_t new_address) |
| This function sets the sensor I2C address used in case multiple devices application, default address 0x52. More... | |
| VL53L1X_ERROR | VL53L1X_SensorInit (uint16_t dev) |
| This function loads the 135 bytes default values to initialize the sensor. More... | |
| VL53L1X_ERROR | VL53L1X_ClearInterrupt (uint16_t dev) |
| This function clears the interrupt, to be called after a ranging data reading to arm the interrupt for the next data ready event. More... | |
| VL53L1X_ERROR | VL53L1X_SetInterruptPolarity (uint16_t dev, uint8_t NewPolarity) |
| This function programs the interrupt polarity 1=active high (default), 0=active low. More... | |
| VL53L1X_ERROR | VL53L1X_GetInterruptPolarity (uint16_t dev, uint8_t *pInterruptPolarity) |
| This function returns the current interrupt polarity 1=active high (default), 0=active low. More... | |
| VL53L1X_ERROR | VL53L1X_StartRanging (uint16_t dev) |
| This function starts the ranging distance operation The ranging operation is continuous. The clear interrupt has to be done after each get data to allow the interrupt to raise when the next data is ready 1=active high (default), 0=active low, use SetInterruptPolarity() to change the interrupt polarity if required. More... | |
| VL53L1X_ERROR | VL53L1X_StopRanging (uint16_t dev) |
| This function stops the ranging. More... | |
| VL53L1X_ERROR | VL53L1X_CheckForDataReady (uint16_t dev, uint8_t *isDataReady) |
| This function checks if the new ranging data is available by polling the dedicated register. More... | |
| VL53L1X_ERROR | VL53L1X_SetTimingBudgetInMs (uint16_t dev, uint16_t TimingBudgetInMs) |
| This function programs the timing budget in ms. Predefined values = 15, 20, 33, 50, 100(default), 200, 500. More... | |
| VL53L1X_ERROR | VL53L1X_GetTimingBudgetInMs (uint16_t dev, uint16_t *pTimingBudget) |
| This function returns the current timing budget in ms. More... | |
| VL53L1X_ERROR | VL53L1X_SetDistanceMode (uint16_t dev, uint16_t DM) |
| This function programs the distance mode (1=short, 2=long(default)). Short mode max distance is limited to 1.3 m but better ambient immunity. Long mode can range up to 4 m in the dark with 200 ms timing budget. More... | |
| VL53L1X_ERROR | VL53L1X_GetDistanceMode (uint16_t dev, uint16_t *DM) |
| This function returns the current distance mode (1=short, 2=long). More... | |
| VL53L1X_ERROR | VL53L1X_SetInterMeasurementInMs (uint16_t dev, uint32_t InterMeasMs) |
| This function programs the Intermeasurement period in ms Intermeasurement period must be >/= timing budget. This condition is not checked by the API, the customer has the duty to check the condition. Default = 100 ms. More... | |
| VL53L1X_ERROR | VL53L1X_GetInterMeasurementInMs (uint16_t dev, uint16_t *pIM) |
| This function returns the Intermeasurement period in ms. More... | |
| VL53L1X_ERROR | VL53L1X_BootState (uint16_t dev, uint8_t *state) |
| This function returns the boot state of the device (1:booted, 0:not booted) More... | |
| VL53L1X_ERROR | VL53L1X_GetSensorId (uint16_t dev, uint16_t *sensorId) |
| This function returns the sensor id, sensor Id must be 0xEEAC. More... | |
| VL53L1X_ERROR | VL53L1X_GetDistance (uint16_t dev, uint16_t *distance) |
| This function returns the distance measured by the sensor in mm. More... | |
| VL53L1X_ERROR | VL53L1X_GetSignalPerSpad (uint16_t dev, uint16_t *signalRate) |
| This function returns the returned signal per SPAD in kcps/SPAD. With kcps stands for Kilo Count Per Second. More... | |
| VL53L1X_ERROR | VL53L1X_GetAmbientPerSpad (uint16_t dev, uint16_t *ambPerSp) |
| This function returns the ambient per SPAD in kcps/SPAD. More... | |
| VL53L1X_ERROR | VL53L1X_GetSignalRate (uint16_t dev, uint16_t *signal) |
| This function returns the returned signal in kcps. More... | |
| VL53L1X_ERROR | VL53L1X_GetSpadNb (uint16_t dev, uint16_t *spNb) |
| This function returns the current number of enabled SPADs. More... | |
| VL53L1X_ERROR | VL53L1X_GetAmbientRate (uint16_t dev, uint16_t *ambRate) |
| This function returns the ambient rate in kcps. More... | |
| VL53L1X_ERROR | VL53L1X_GetRangeStatus (uint16_t dev, uint8_t *rangeStatus) |
| This function returns the ranging status error (0:no error, 1:sigma failed, 2:signal failed, ..., 7:wrap-around) More... | |
| VL53L1X_ERROR | VL53L1X_GetResult (uint16_t dev, VL53L1X_Result_t *pResult) |
| This function returns measurements and the range status in a single read access. More... | |
| VL53L1X_ERROR | VL53L1X_SetOffset (uint16_t dev, int16_t OffsetValue) |
| This function programs the offset correction in mm. More... | |
| VL53L1X_ERROR | VL53L1X_GetOffset (uint16_t dev, int16_t *offset) |
| This function returns the programmed offset correction value in mm. More... | |
| VL53L1X_ERROR | VL53L1X_SetXtalk (uint16_t dev, uint16_t XtalkValue) |
| This function programs the xtalk correction value in cps (Count Per Second). This is the number of photons reflected back from the cover glass in cps. More... | |
| VL53L1X_ERROR | VL53L1X_GetXtalk (uint16_t dev, uint16_t *xtalk) |
| This function returns the current programmed xtalk correction value in cps. More... | |
| VL53L1X_ERROR | VL53L1X_SetDistanceThreshold (uint16_t dev, uint16_t ThreshLow, uint16_t ThreshHigh, uint8_t Window, uint8_t IntOnNoTarget) |
| This function programs the threshold detection mode Example: VL53L1X_SetDistanceThreshold(dev,100,300,0,1): Below 100 VL53L1X_SetDistanceThreshold(dev,100,300,1,1): Above 300 VL53L1X_SetDistanceThreshold(dev,100,300,2,1): Out of window VL53L1X_SetDistanceThreshold(dev,100,300,3,1): In window . More... | |
| VL53L1X_ERROR | VL53L1X_GetDistanceThresholdWindow (uint16_t dev, uint16_t *window) |
| This function returns the window detection mode (0=below; 1=above; 2=out; 3=in) More... | |
| VL53L1X_ERROR | VL53L1X_GetDistanceThresholdLow (uint16_t dev, uint16_t *low) |
| This function returns the low threshold in mm. More... | |
| VL53L1X_ERROR | VL53L1X_GetDistanceThresholdHigh (uint16_t dev, uint16_t *high) |
| This function returns the high threshold in mm. More... | |
| VL53L1X_ERROR | VL53L1X_SetROICenter (uint16_t dev, uint8_t ROICenter) |
| This function programs the new user ROI center, please to be aware that there is no check in this function. if the ROI center vs ROI size is out of border the ranging function return error #13. More... | |
| VL53L1X_ERROR | VL53L1X_GetROICenter (uint16_t dev, uint8_t *ROICenter) |
| This function returns the current user ROI center. More... | |
| VL53L1X_ERROR | VL53L1X_SetROI (uint16_t dev, uint16_t X, uint16_t Y) |
| This function programs the ROI (Region of Interest) The ROI position is centered, only the ROI size can be reprogrammed. The smallest acceptable ROI size = 4 . More... | |
| VL53L1X_ERROR | VL53L1X_GetROI_XY (uint16_t dev, uint16_t *ROI_X, uint16_t *ROI_Y) |
| This function returns width X and height Y. More... | |
| VL53L1X_ERROR | VL53L1X_SetSignalThreshold (uint16_t dev, uint16_t Signal) |
| This function programs a new signal threshold in kcps (default=1024 kcps . More... | |
| VL53L1X_ERROR | VL53L1X_GetSignalThreshold (uint16_t dev, uint16_t *signal) |
| This function returns the current signal threshold in kcps. More... | |
| VL53L1X_ERROR | VL53L1X_SetSigmaThreshold (uint16_t dev, uint16_t Sigma) |
| This function programs a new sigma threshold in mm (default=15 mm) More... | |
| VL53L1X_ERROR | VL53L1X_GetSigmaThreshold (uint16_t dev, uint16_t *sigma) |
| This function returns the current sigma threshold in mm. More... | |
| VL53L1X_ERROR | VL53L1X_StartTemperatureUpdate (uint16_t dev) |
| This function performs the temperature calibration. It is recommended to call this function any time the temperature might have changed by more than 8 deg C without sensor ranging activity for an extended period. More... | |
Variables | |
| const uint8_t | VL51L1X_DEFAULT_CONFIGURATION [] |
| static const uint8_t | status_rtn [24] |
| VL53L1X_ERROR VL53L1X_BootState | ( | uint16_t | dev, |
| uint8_t * | state | ||
| ) |
This function returns the boot state of the device (1:booted, 0:not booted)
Definition at line 526 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_CheckForDataReady | ( | uint16_t | dev, |
| uint8_t * | isDataReady | ||
| ) |
This function checks if the new ranging data is available by polling the dedicated register.
| isDataReady==0 -> not ready; isDataReady==1 -> ready |
Definition at line 291 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_ClearInterrupt | ( | uint16_t | dev | ) |
This function clears the interrupt, to be called after a ranging data reading to arm the interrupt for the next data ready event.
Definition at line 245 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_GetAmbientPerSpad | ( | uint16_t | dev, |
| uint16_t * | ambPerSp | ||
| ) |
This function returns the ambient per SPAD in kcps/SPAD.
Definition at line 570 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_GetAmbientRate | ( | uint16_t | dev, |
| uint16_t * | ambRate | ||
| ) |
This function returns the ambient rate in kcps.
Definition at line 603 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_GetDistance | ( | uint16_t | dev, |
| uint16_t * | distance | ||
| ) |
This function returns the distance measured by the sensor in mm.
Definition at line 546 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_GetDistanceMode | ( | uint16_t | dev, |
| uint16_t * | DM | ||
| ) |
This function returns the current distance mode (1=short, 2=long).
Definition at line 487 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_GetDistanceThresholdHigh | ( | uint16_t | dev, |
| uint16_t * | high | ||
| ) |
This function returns the high threshold in mm.
Definition at line 735 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_GetDistanceThresholdLow | ( | uint16_t | dev, |
| uint16_t * | low | ||
| ) |
This function returns the low threshold in mm.
Definition at line 725 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_GetDistanceThresholdWindow | ( | uint16_t | dev, |
| uint16_t * | window | ||
| ) |
This function returns the window detection mode (0=below; 1=above; 2=out; 3=in)
Definition at line 716 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_GetInterMeasurementInMs | ( | uint16_t | dev, |
| uint16_t * | pIM | ||
| ) |
This function returns the Intermeasurement period in ms.
Definition at line 512 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_GetInterruptPolarity | ( | uint16_t | dev, |
| uint8_t * | pInterruptPolarity | ||
| ) |
This function returns the current interrupt polarity
1=active high (default), 0=active low.
Definition at line 264 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_GetOffset | ( | uint16_t | dev, |
| int16_t * | offset | ||
| ) |
This function returns the programmed offset correction value in mm.
Definition at line 658 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_GetRangeStatus | ( | uint16_t | dev, |
| uint8_t * | rangeStatus | ||
| ) |
This function returns the ranging status error
(0:no error, 1:sigma failed, 2:signal failed, ..., 7:wrap-around)
Definition at line 613 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_GetResult | ( | uint16_t | dev, |
| VL53L1X_Result_t * | pResult | ||
| ) |
This function returns measurements and the range status in a single read access.
Definition at line 626 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_GetROI_XY | ( | uint16_t | dev, |
| uint16_t * | ROI_X, | ||
| uint16_t * | ROI_Y | ||
| ) |
This function returns width X and height Y.
Definition at line 780 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_GetROICenter | ( | uint16_t | dev, |
| uint8_t * | ROICenter | ||
| ) |
This function returns the current user ROI center.
Definition at line 752 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_GetSensorId | ( | uint16_t | dev, |
| uint16_t * | sensorId | ||
| ) |
This function returns the sensor id, sensor Id must be 0xEEAC.
Definition at line 536 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_GetSigmaThreshold | ( | uint16_t | dev, |
| uint16_t * | sigma | ||
| ) |
This function returns the current sigma threshold in mm.
Definition at line 822 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_GetSignalPerSpad | ( | uint16_t | dev, |
| uint16_t * | signalRate | ||
| ) |
This function returns the returned signal per SPAD in kcps/SPAD. With kcps stands for Kilo Count Per Second.
Definition at line 557 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_GetSignalRate | ( | uint16_t | dev, |
| uint16_t * | signal | ||
| ) |
This function returns the returned signal in kcps.
Definition at line 581 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_GetSignalThreshold | ( | uint16_t | dev, |
| uint16_t * | signal | ||
| ) |
This function returns the current signal threshold in kcps.
Definition at line 799 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_GetSpadNb | ( | uint16_t | dev, |
| uint16_t * | spNb | ||
| ) |
This function returns the current number of enabled SPADs.
Definition at line 592 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_GetSWVersion | ( | VL53L1X_Version_t * | pVersion | ) |
This function returns the SW driver version.
Definition at line 206 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_GetTimingBudgetInMs | ( | uint16_t | dev, |
| uint16_t * | pTimingBudget | ||
| ) |
This function returns the current timing budget in ms.
Definition at line 411 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_GetXtalk | ( | uint16_t | dev, |
| uint16_t * | xtalk | ||
| ) |
This function returns the current programmed xtalk correction value in cps.
Definition at line 685 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_SensorInit | ( | uint16_t | dev | ) |
This function loads the 135 bytes default values to initialize the sensor.
| dev | Device address |
Definition at line 225 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_SetDistanceMode | ( | uint16_t | dev, |
| uint16_t | DM | ||
| ) |
This function programs the distance mode (1=short, 2=long(default)). Short mode max distance is limited to 1.3 m but better ambient immunity.
Long mode can range up to 4 m in the dark with 200 ms timing budget.
Definition at line 452 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_SetDistanceThreshold | ( | uint16_t | dev, |
| uint16_t | ThreshLow, | ||
| uint16_t | ThreshHigh, | ||
| uint8_t | Window, | ||
| uint8_t | IntOnNoTarget | ||
| ) |
This function programs the threshold detection mode
Example:
VL53L1X_SetDistanceThreshold(dev,100,300,0,1): Below 100
VL53L1X_SetDistanceThreshold(dev,100,300,1,1): Above 300
VL53L1X_SetDistanceThreshold(dev,100,300,2,1): Out of window
VL53L1X_SetDistanceThreshold(dev,100,300,3,1): In window
.
| dev | : device address |
| ThreshLow(in | mm) : the threshold under which one the device raises an interrupt if Window = 0 |
| ThreshHigh(in | mm) : the threshold above which one the device raises an interrupt if Window = 1 |
| Window | detection mode : 0=below, 1=above, 2=out, 3=in |
| IntOnNoTarget | = 1 (No longer used - just use 1) |
Definition at line 695 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_SetI2CAddress | ( | uint16_t | dev, |
| uint8_t | new_address | ||
| ) |
This function sets the sensor I2C address used in case multiple devices application, default address 0x52.
Definition at line 217 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_SetInterMeasurementInMs | ( | uint16_t | dev, |
| uint32_t | InterMeasMs | ||
| ) |
This function programs the Intermeasurement period in ms
Intermeasurement period must be >/= timing budget. This condition is not checked by the API, the customer has the duty to check the condition. Default = 100 ms.
Definition at line 499 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_SetInterruptPolarity | ( | uint16_t | dev, |
| uint8_t | NewPolarity | ||
| ) |
This function programs the interrupt polarity
1=active high (default), 0=active low.
Definition at line 253 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_SetOffset | ( | uint16_t | dev, |
| int16_t | OffsetValue | ||
| ) |
This function programs the offset correction in mm.
| OffsetValue:the | offset correction value to program in mm |
Definition at line 645 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_SetROI | ( | uint16_t | dev, |
| uint16_t | X, | ||
| uint16_t | Y | ||
| ) |
This function programs the ROI (Region of Interest)
The ROI position is centered, only the ROI size can be reprogrammed.
The smallest acceptable ROI size = 4
.
| X:ROI | Width; Y=ROI Height |
Definition at line 761 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_SetROICenter | ( | uint16_t | dev, |
| uint8_t | ROICenter | ||
| ) |
This function programs the new user ROI center, please to be aware that there is no check in this function. if the ROI center vs ROI size is out of border the ranging function return error #13.
Definition at line 745 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_SetSigmaThreshold | ( | uint16_t | dev, |
| uint16_t | Sigma | ||
| ) |
This function programs a new sigma threshold in mm (default=15 mm)
Definition at line 810 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_SetSignalThreshold | ( | uint16_t | dev, |
| uint16_t | Signal | ||
| ) |
This function programs a new signal threshold in kcps (default=1024 kcps
.
Definition at line 791 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_SetTimingBudgetInMs | ( | uint16_t | dev, |
| uint16_t | TimingBudgetInMs | ||
| ) |
This function programs the timing budget in ms. Predefined values = 15, 20, 33, 50, 100(default), 200, 500.
Definition at line 309 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_SetXtalk | ( | uint16_t | dev, |
| uint16_t | XtalkValue | ||
| ) |
This function programs the xtalk correction value in cps (Count Per Second).
This is the number of photons reflected back from the cover glass in cps.
Definition at line 670 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_StartRanging | ( | uint16_t | dev | ) |
This function starts the ranging distance operation
The ranging operation is continuous. The clear interrupt has to be done after each get data to allow the interrupt to raise when the next data is ready
1=active high (default), 0=active low, use SetInterruptPolarity() to change the interrupt polarity if required.
Definition at line 275 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_StartTemperatureUpdate | ( | uint16_t | dev | ) |
This function performs the temperature calibration. It is recommended to call this function any time the temperature might have changed by more than 8 deg C without sensor ranging activity for an extended period.
Definition at line 833 of file VL53L1X_api.c.
| VL53L1X_ERROR VL53L1X_StopRanging | ( | uint16_t | dev | ) |
This function stops the ranging.
Definition at line 283 of file VL53L1X_api.c.
|
static |
Definition at line 201 of file VL53L1X_api.c.
| const uint8_t VL51L1X_DEFAULT_CONFIGURATION[] |
Definition at line 107 of file VL53L1X_api.c.