VL53L0X LiDAR Driver for XRCU.
More...
#include <Vl53l0x.h>
|
| | Vl53l0x (const uint32_t init_port) |
| | Creates a Vl53l0x object.
|
| |
|
| ~Vl53l0x () |
| | Destroys this object and releases the occupied resources.
|
| |
| void | re_address_device (const uint8_t new_i2c_address) |
| | Changes the I2C address of this VL53L0X sensor.
|
| |
| bool | begin () |
| | Activates this VL53L0X sensor.
|
| |
| bool | begin (const uint8_t new_i2c_address) |
| | Activates this VL53L0X sensor with another I2C address.
|
| |
| void | disable () |
| | Teporarily disables this VL53L0X sensor.
|
| |
| void | enable () |
| | Re-enables this VL53L0X sensor.
|
| |
| uint16_t | read_dist_mm () |
| | Reads the distance between this VL53L0X sensor and the obstacle in front of it.
|
| |
| virtual void | end () |
| | Deactivates this ultrasonic sensor.
|
| |
| uint16_t | read_dist_cm () |
| | Reads the distance between this ultrasonic sensor and the obstacle in front of it.
|
| |
|
| void | set_beginned (bool is_beginned) |
| | Sets whether this ultrasonic sensor is activated.
|
| |
| void | set_enabled (bool is_enabled) |
| | Sets whether this ultrasonic sensor is enabled or not.
|
| |
| bool | is_enabled () |
| | Checks if this ultrasonic sensor is enabled or not.
|
| |
| | Uts_togglable () |
| | Constructor for a togglable ultrasonic sensor driver.
|
| |
| bool | is_beginned () |
| | Checks if this ultrasonic sensor is already activated.
|
| |
| void | store_prev_dist_mm (uint16_t dist_mm) |
| | Stores the previous measured distance.
|
| |
| uint16_t | get_prev_dist_mm () |
| | Gets the previous measured distance.
|
| |
| | Uts_general () |
| | Constructor for a generic ultrasonic sensor driver.
|
| |
|
| Supported_sensor () |
| | Creates an object of a supported sensor.
|
| |
|
| Supported_module () |
| | Creates an object of a supported module.
|
| |
|
static const uint16_t | ERROR_DIST_MM = 8888 |
| | The distance representing a measurement error (in millimeters).
|
| |
VL53L0X LiDAR Driver for XRCU.
- Author
- YH Choi @ JM9
- Note
- The maximu possible distance measured in normal range is 120cm, given that sensor and obstacle is stable.
Therefore, this library uses long range mode to ensure soccer robot can see the goal walls when at the center of field.
Soccer field internal length == 243cm == 121.5cm * 2
◆ Vl53l0x()
| Vl53l0x::Vl53l0x |
( |
const uint32_t | init_port | ) |
|
Creates a Vl53l0x object.
- Parameters
-
| init_port | the I2C port connected to the VL53L0X sensor |
◆ begin() [1/2]
Activates this VL53L0X sensor.
YOU MUST CALL ME IN void setup () FUNCTION TO USE THIS OBJECT PROPERLY.
Configures the settings of the pin modes, I2C bus and this sensor.
- Returns
true if activation is successful, false if activation failed
- See also
- begin(uint8_t)
Reimplemented from Uts_togglable.
◆ begin() [2/2]
| bool Vl53l0x::begin |
( |
const uint8_t | new_i2c_address | ) |
|
Activates this VL53L0X sensor with another I2C address.
The sensor alawys start with I2C_address == 0x29, since the modified I2C address is not preserved after power off the sensor.
For sharing multiple VL53L0X sensors on the same bus, you may call this function when the selected VL53L0X sensor is enabled by its XSHUT pin.
This function would first perform re-addressing, then activates and configures the selected sensor.
YOU MUST CALL ME IN void setup () FUNCTION TO USE THIS OBJECT PROPERLY.
Configures the settings of the pin modes, I2C bus and this sensor.
- Parameters
-
| new_i2c_address | the new I2C address of this VL53L0X sensor |
- Returns
true if activation is successful, false if activation failed
- See also
- re_address_device(uint8_t)
-
begin()
◆ disable()
| void Vl53l0x::disable |
( |
| ) |
|
|
virtual |
◆ enable()
◆ re_address_device()
| void Vl53l0x::re_address_device |
( |
const uint8_t | new_i2c_address | ) |
|
Changes the I2C address of this VL53L0X sensor.
- Parameters
-
| new_i2c_address | the new I2C address to be given to this VL53L0X sensor |
◆ read_dist_mm()
| uint16_t Vl53l0x::read_dist_mm |
( |
| ) |
|
|
virtual |
Reads the distance between this VL53L0X sensor and the obstacle in front of it.
- Returns
- the distance between this VL53L0X sensor and the obstacle in front of it (in millimeters)
- See also
- read_dist_cm()
Reimplemented from Uts_general.
The documentation for this class was generated from the following files:
- Vl53l0x/src/Vl53l0x.h
- Vl53l0x/src/Vl53l0x.cpp