From 9dbe3e1f5d16b5a8f99a8dfddce80bd0da1d513d Mon Sep 17 00:00:00 2001 From: Musab Erdem Date: Thu, 18 Jul 2024 10:29:01 +0200 Subject: [PATCH] optimierung --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index b0d7611..f24834c 100644 --- a/main.py +++ b/main.py @@ -242,7 +242,7 @@ class ArduinoGUI: com_port = self.combobox_value.get() if com_port: try: - self.arduino = serial.Serial(com_port, 19200, timeout=2) + self.arduino = serial.Serial(com_port, 19200, timeout=1) messagebox.showinfo("Info", "Arduino verbunden an " + com_port) except Exception as e: messagebox.showerror("Fehler", str(e)) @@ -453,7 +453,7 @@ class ArduinoGUI: if command == 'a': message = f"{self.current_angle};{self.current_torque};{self.analogInput};{self.currentSetpoint};{self.currentOutput}\n" self.ser.write(message.encode()) - time.sleep(0.1) + time.sleep(0.5) except Exception as e: print(e) #self.ser.write(b'Hallo\n')