feicccccccc / B0602-Lidar-Python-Library

A simple Python library for low cost B0602 lidar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

B0602-Lidar-Python-Library

A simple Python library for low cost B0602 lidar Feel free to have a try 😄

example

To use the library, you need the following library:

  • PySerial

Install PySerial with pip

pip install pyserial

Use the library

Example:

from B0602Lidar import B0602Lidar

lidar = B0602Lidar(port='/dev/ttyUSB0')
while 1:
    print(lidar.run())

run() method return A frame represent by a dictionary

  • First key is angle , value is 20 data point [angle , distance in mm] in that scan
  • Second key is 'r/s' , value is r/s

About

A simple Python library for low cost B0602 lidar

License:Apache License 2.0


Languages

Language:C++ 91.1%Language:Python 5.3%Language:C 3.2%Language:CMake 0.3%