motor test

This commit is contained in:
Bernd Reuther 2021-03-04 14:43:53 +01:00
parent 220cd6610d
commit ec3e3d0ba3
2 changed files with 7 additions and 1 deletions

View File

@ -14,7 +14,7 @@ for pin in pins_out:
for pin in pins_in:
GPIO.setup(pins_in[pin]['nr'], GPIO.IN)
GPIO.output(pins_out['kamera']['nr'], GPIO.HIGH)
GPIO.output(pins_out['kamera']['nr'], GPIO.LOW)
GPIO.setup(20, GPIO.OUT)
m3_pwm4 = GPIO.PWM(20, freq)

View File

@ -52,6 +52,12 @@ class motor():
self.pwm4 = GPIO.PWM(self.sp4, self.freq)
self.pwm4.start(0)
def stop(self):
self.pwm1.stop()
self.pwm2.stop()
self.pwm3.stop()
self.pwm4.stop()
def vorwaerts(self, schritte):
ges_schritte = schritte * 8
#print(str(ges_schritte))