I am using the Garmin Lidar-Lite v4 on a Raspberry Pi 4 running Rasbian.
I ran both
pip3 install adafruit-circuitpython-lidarlite
and
sudo pip3 install adafruit-circuitpython-lidarlite
Using “sudo i2cdetect -y 1”, the address of ‘62’ is detected, which matches the Lidar-Lite v4
From https://pypi.org/project/adafruit-circu … lidarlite/
I was running the “Usage Example”
import time
import board
import busio
import adafruit_lidarlite
Create library object using our Bus I2C port
i2c = busio.I2C(board.SCL, board.SDA)
Default configuration, with only i2c wires
sensor = adafruit_lidarlite.LIDARLite(i2c)
while True:
try:
We print tuples so you can plot with Mu Plotter
print((sensor.distance,))
except RuntimeError as e:
If we get a reading error, just print it and keep truckin’
print(e)
time.sleep(0.01) # you can remove this for ultra-fast measurements!
but I’m getting “Measurement failure” message
My Raspbian version is
=====================
pi@p4mobile:~/pi_prog $ cat /etc/os-release
PRETTY_NAME=“Raspbian GNU/Linux 10 (buster)”
NAME=“Raspbian GNU/Linux”
VERSION_ID=“10”
VERSION=“10 (buster)”
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL=“http://www.raspbian.org/”
SUPPORT_URL=“http://www.raspbian.org/RaspbianForums”
BUG_REPORT_URL=“http://www.raspbian.org/RaspbianBugs”
Only VCC, GND, SCL & SDA signals are connected