new Stepper Controll and fix scan anomali
This commit is contained in:
@@ -5,7 +5,7 @@ import time # Time module
|
||||
#port = input("Enter port name which lidar is connected:") #windows
|
||||
#port = "/dev/ttyUSB0" #linux
|
||||
f = open("PoinCloudWeb.Scanner\datafile.txt","wt")
|
||||
Obj = PyLidar3.YdLidarX4(port='COM6',chunk_size=10000) #PyLidar3.your_version_of_lidar(port,chunk_size)
|
||||
Obj = PyLidar3.YdLidarX4(port='COM6',chunk_size=20000) #PyLidar3.your_version_of_lidar(port,chunk_size)
|
||||
if(Obj.Connect()):
|
||||
print(Obj.GetDeviceInfo())
|
||||
gen = Obj.StartScanning()
|
||||
@@ -13,7 +13,7 @@ if(Obj.Connect()):
|
||||
data = next(gen)
|
||||
#print(data)
|
||||
for x,y in data.items():
|
||||
f.write("a:" + str(x) + " d:" + str(y) + "\n")
|
||||
f.write(str(x) + " / " + str(y) + "\n")
|
||||
f.close()
|
||||
Obj.StopScanning()
|
||||
Obj.Disconnect()
|
||||
|
||||
Reference in New Issue
Block a user