I am trying to interface the TF-LC02 LiDAR module using serial communication, but I am not receiving any data. I have tested it with a Raspberry Pi, an Arduino, and a USB-to-TTL adapter connected to my laptop. The LiDAR module's infrared light is visible through a mobile camera, indicating that it is powered on, but I get no response when trying to read data from it.
I am using the following Python script to read data via a USB-to-TTL adapter on my laptop:
import serial
ser = serial.Serial('/dev/ttyUSB0', 115200, timeout=1) # Adjust port accordingly
while True:
data = ser.readline().decode('utf-8', errors='ignore').strip()
if data:
print("Received:", data)
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744934345a4601925.html
评论列表(0条)