adafruit_lidarlite

A CircuitPython & Python library for Garmin LIDAR Lite sensors over I2C

  • Author(s): ladyada

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_lidarlite.LIDARLite(i2c_bus, *, reset_pin=None, configuration=0, address=98)

A driver for the Garmin LIDAR Lite laser distance sensor. :param i2c_bus: The busio.I2C object to use. This is the only required parameter. :param int address: (optional) The I2C address of the device to set after initialization.

configure(config)

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.

distance

The measured distance in cm. Will take a bias reading every 100 calls

read_distance(bias=False)

Perform a distance reading with or without ‘bias’. It’s recommended to take a bias measurement every 100 non-bias readings (they’re slower)

reset()

Hardware reset (if pin passed into init) or software reset. Will take 100 readings in order to ‘flush’ measurement unit, otherwise data is off.

status

The status byte, check datasheet for bitmask