pyupm_lidarlitev3 module¶
-
class
pyupm_lidarlitev3.
LIDARLITEV3
(bus, devAddr=98)[source]¶ Bases:
object
API for the LIDARLITEV3 Optical Distance Measurement Sensor.
ID: lidarlightv3
Name: Optical Distance Measurement Sensor
Category: light
Manufacturer: garmin
Connection: i2c
Link:https://www.sparkfun.com/products/14032 It is a compact, high- performance optical distance measurement sensor from Garmin. [ LIDARLITEV3 Datasheet]http://static.garmin.com/pumac/LIDAR_Lite_v3_Operation_Manual_and_Technical_Specifications.pdf
C++ includes: lidarlitev3.hpp
-
getDistance
()[source]¶ int getDistance()
LIDARLITEV3 object destructor; basically, it closes the I2C connection.
~LIDARLITEV3 (); no need for the destructor - the I2c connection will be closed when m_i2ControlCtx variable will be out of context Returns distance measurement on success Retruns -1 on failure.
-
i2cReadReg_16
(reg)[source]¶ uint16_t i2cReadReg_16(int reg)
Reads a two-byte register
reg: Address of the register
-
i2cReadReg_8
(reg)[source]¶ uint8_t i2cReadReg_8(int reg)
Reads a one-byte register
reg: Address of the register
-