wahajmurtaza / HLS-LFCD2

HLS-LFCD2 interfacing with python
MIT License
4 stars 3 forks source link
hls-lfcd2 hls-lidar lidar python python3 serial thread

HLS-LFCD2

This repo is for interfacing HLS-LFCD2 with python3

ANGLE DIRECTIONS

LIDAR

    270
180     0
    90

SETUP

Dependencies

Pins Connection

Other Connector

CODE

from hls_lfcd2 import Lidar
from time import sleep

lidar = Lidar("COM6", angle_offset=0)
lidar.start()

# required to obtain valid data of 360 degress
sleep(2)

print(f'rpm = {lidar.get_rpm()}')
print(f'distance = {lidar.get_distance()}')
print(f'intensity = {lidar.get_intensity()}')

# stopped lidar can be started again
lidar.stop()

# once termindated, it can not be started
lidar.terminate()

CONTACT

In case of any query you can contact at