From 7d9d7f956408191731062c4fc9be28413a781645 Mon Sep 17 00:00:00 2001 From: Bernd Reuther Date: Thu, 4 Mar 2021 12:42:24 +0100 Subject: [PATCH] motor test --- src/schrittmotor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/schrittmotor.py b/src/schrittmotor.py index 1a4165a..0443993 100644 --- a/src/schrittmotor.py +++ b/src/schrittmotor.py @@ -87,12 +87,13 @@ def einzelschritt(spule, status, ges_schritte, schritt, t1, t2): w = (schritt * 100 / (ges_schritte - 1)) * 1.8 s = round(math.sin(math.radians(w)), 2) t = t2 - (s * (t2 - t1)) - print(str(t)) + #print(str(t)) if status == 1: for i in range(0, 91, 5): dc = round(math.sin(math.radians(i)) * 100, 0) spule.ChangeDutyCycle(dc) + print(str(dc)) time.sleep(t) else: for i in range(0, 91, 5):