From e5114d38f95fe79e5d8cb8ef2934f44483d0efe0 Mon Sep 17 00:00:00 2001 From: Bernd Reuther Date: Thu, 4 Mar 2021 12:47:01 +0100 Subject: [PATCH] motor test --- src/schrittmotor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/schrittmotor.py b/src/schrittmotor.py index 0443993..80156ad 100644 --- a/src/schrittmotor.py +++ b/src/schrittmotor.py @@ -34,18 +34,21 @@ class motor: self.pwm1 = GPIO.PWM(sp1, freq) self.pwm1.start(0) + self.pwm1.ChangeFrequency(freq) self.pwm1.ChangeDutyCycle(0) self.pwm2 = GPIO.PWM(sp2, freq) self.pwm2.start(0) + self.pwm2.ChangeFrequency(freq) self.pwm2.ChangeDutyCycle(0) self.pwm3 = GPIO.PWM(sp3, freq) self.pwm3.start(0) + self.pwm3.ChangeFrequency(freq) self.pwm3.ChangeDutyCycle(0) if self.halten == 1: - self.pwm4 = GPIO.PWM(sp4, freq_halten) + self.pwm4 = GPIO.PWM(sp4, freq) self.pwm4.start(0) self.pwm4.ChangeDutyCycle(cyc_halten) else: