new Stepper Controll and fix scan anomali

This commit is contained in:
Lukas Droste
2021-07-31 20:32:11 +02:00
parent bd9410519a
commit 36d33b6286
4 changed files with 6556 additions and 387 deletions

View File

@@ -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()