adafruit_lidarlite
¶
A CircuitPython & Python library for Garmin LIDAR Lite sensors over I2C
Author(s): ladyada, johnrbnsn
Implementation Notes¶
Hardware:
Software and Dependencies:
Adafruit CircuitPython firmware for the supported boards: https://github.com/adafruit/circuitpython/releases
Adafruit’s Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
- adafruit_lidarlite.CONFIG_LOWSENSITIVE = 5¶
Status Registers
- class adafruit_lidarlite.LIDARLite(i2c_bus: I2C, *, reset_pin: Pin | None = None, configuration: int | None = 0, address: int | None = 98, sensor_type: str | None = 'V3')¶
A driver for the Garmin LIDAR Lite laser distance sensor.
Initialize the hardware for the LIDAR over I2C. You can pass in an optional reset_pin for when you call reset(). There are a few common configurations Garmin suggests: CONFIG_DEFAULT, CONFIG_SHORTFAST, CONFIG_DEFAULTFAST, CONFIG_MAXRANGE, CONFIG_HIGHSENSITIVE, and CONFIG_LOWSENSITIVE. For the I2C address, the default is 0x62 but if you pass a different number in, we’ll try to change the address so multiple LIDARs can be connected. (Note all but one need to be in reset for this to work!)
- Parameters:
- configure(config: int) None ¶
Set the LIDAR desired style of measurement. There are a few common configurations Garmin suggests: CONFIG_DEFAULT, CONFIG_SHORTFAST, CONFIG_DEFAULTFAST, CONFIG_MAXRANGE, CONFIG_HIGHSENSITIVE, and CONFIG_LOWSENSITIVE.
- read_distance_v3(bias: bool | None = False) int ¶
Perform a distance reading with or without ‘bias’. It’s recommended to take a bias measurement every 100 non-bias readings (they’re slower)