A simple Python library for low cost B0602 lidar Feel free to have a try 😄
To use the library, you need the following library:
- PySerial
pip install pyserial
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