chinese lidar "camsense X1" outputs data over serial (GND, VCC +5V, TX).
this python script reads the data and visualizes it using matplotlib.
There are two infinite loops, one imports the data and the other plots it.
to run the script "lidar.py" type:
python lidar.py COM12
with the according com port name
the included "lidar.bat" file just runs this script with windows cmd for COM12.
to find open serial ports type following into python console:
import serial.tools.list_ports as port_list
ports = list(port_list.comports())
for p in ports:
print(p)
some info and comments ar included in the python notebook "lidar.ipynb".
The serial connection and data packet format is described at:
https://github.com/Vidicon/camsense-X1
and the visualization script "lidar.py" is heavily inspired by:
https://memotut.com/try-using-cheap-lidar-(camsense-x1)-819ac/