Skip to content

Dnapert/LidarLight_v3HP_micropython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 and the official Datasheet.

Basic usage:

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.

About

A micropython library for the garmin lidar light v3hp

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages