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: 3 months ago
JSON representation
A micropython library for the garmin lidar light v3hp
- Host: GitHub
- URL: https://github.com/Dnapert/LidarLight_v3HP_micropython
- Owner: Dnapert
- Created: 2024-01-29T19:18:55.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-01-30T00:13:13.000Z (9 months ago)
- Last Synced: 2024-05-13T03:33:32.322Z (6 months ago)
- Language: Python
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-micropython - LidarLight_v3HP_micropython - A MicroPython library for the Garmin Lidar Lite v3HP. (Libraries / Sensors)
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 V3HPi2c = 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.