Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/Dnapert/LidarLight_v3HP_micropython

A micropython library for the garmin lidar light v3hp
https://github.com/Dnapert/LidarLight_v3HP_micropython

Last synced: about 2 months ago
JSON representation

A micropython library for the garmin lidar light v3hp

Lists

README

        

# MicroPython library for the Garmin Lidar Lite v3HP

## This is a basic MicroPython library for the Garmin Lidar Lite v3HP. It is based on the official [Arduino library ](https://github.com/garmin/LIDARLite_Arduino_Library/blob/master/src/LIDARLite_v3HP.cpp) and the official [Datasheet](https://static.garmin.com/pumac/LIDAR-Lite_v3HP_Instructions_EN.pdf).

Basic usage:

```python
from machine import I2C, Pin
from lidarLitev3hp import V3HP

i2c = I2C(1, scl=Pin(7), sda=Pin(6), freq=400000)
# Class is initialized with the mode, and the i2c object
lidar = V3HP( 0 , i2c)

# Single measurement, most accurate
distance = lidar.range()

# Single measurement, fast method, potentially less accurate
distance = lidar.range_fast()
```

## Modes

0: Default mode, balanced performance.

1: Short range, high speed.

2: Default range, higher speed short range. Turns on quick termination detection for faster measurements at short range (with decreasedaccuracy)

3: Maximum range.

4: High sensitivity detection. Overrides default valid measurement detection algorithm, and uses a threshold value for high sensitivity and noise.

5: Low sensitivity detection. Overrides default valid measurement detection algorithm, and uses a threshold value for low sensitivity and noise.

6: Short range, high speed, higher error. Overrides default valid measurement

### On the pi pico, I was able to get a reliable 330 measurements per second using mode 1 with range_fast method, and 280 measurements per second using mode 1 with the standard range method.