diff --git a/src/schrittmotor.py b/src/schrittmotor.py index 1b37e97..86df193 100644 --- a/src/schrittmotor.py +++ b/src/schrittmotor.py @@ -5,7 +5,7 @@ import threading import math GPIO.setmode(GPIO.BCM) -GPIO.setwarnings(False) +#GPIO.setwarnings(False) class motor: @@ -34,27 +34,19 @@ 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) - self.pwm4.start(0) - self.pwm4.ChangeDutyCycle(cyc_halten) + self.pwm4.start(cyc_halten) else: self.pwm4 = GPIO.PWM(sp4, freq) self.pwm4.start(0) - self.pwm4.ChangeDutyCycle(0) print(str(self.pwm4))