From eb32f053678c2777d69df2ff2f6f2fda76bd0224 Mon Sep 17 00:00:00 2001 From: Bernd Reuther Date: Thu, 4 Mar 2021 15:06:52 +0100 Subject: [PATCH] motor test --- kamera_server.py | 3 ++- src/schrittmotor.py | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/kamera_server.py b/kamera_server.py index 3bd7817..d6d3859 100644 --- a/kamera_server.py +++ b/kamera_server.py @@ -26,7 +26,7 @@ m2 = motor('kippen', m2_a1, m2_b1, m2_a2, m2_b2, m2_t1, m2_t2, m2_te, m2_es, 1, m1.start() m2.start() -m1.vorwaerts(10) +#m1.vorwaerts(10) #m1.stop() #m2.stop() @@ -87,6 +87,7 @@ def action(changePin, action): @kamera_server.route("/motor1_test") def motor_test(): #m2.pwm4.ChangeFrequency(freq_halten) + m1.stop() m1.start() m1.vorwaerts(10) diff --git a/src/schrittmotor.py b/src/schrittmotor.py index 37530cb..356e4c4 100644 --- a/src/schrittmotor.py +++ b/src/schrittmotor.py @@ -53,7 +53,10 @@ class motor(): self.pwm4.start(0) def stop(self): - self.pwm4.ChangeFrequency(self.freq) + self.pwm1.stop() + self.pwm2.stop() + self.pwm3.stop() + self.pwm4.stop() def vorwaerts(self, schritte): ges_schritte = schritte * 8