motor test

This commit is contained in:
Bernd Reuther 2021-03-04 12:22:29 +01:00
parent 8aad41d936
commit e902132e44
2 changed files with 5 additions and 1 deletions

View File

@ -16,7 +16,10 @@ for pin in pins_in:
GPIO.output(pins_out['kamera']['nr'], GPIO.HIGH)
m1 = motor('drehen', m1_a1, m1_b1, m1_a2, m1_b2, m1_t1, m1_t2, m1_te, m1_es, 0)
m1 = motor('kippen', m2_a1, m2_b1, m2_a2, m2_b2, m2_t1, m2_t2, m2_te, m2_es, 1)
m2 = motor('kippen', m2_a1, m2_b1, m2_a2, m2_b2, m2_t1, m2_t2, m2_te, m2_es, 1)
m1.schritte_max = 180
m2.schritte_max = 90
@kamera_server.route("/")
def main():

View File

@ -54,6 +54,7 @@ class motor:
def vorwaerts(self, schritte):
ges_schritte = schritte * 8
print(str(ges_schritte))
print(str(self.schritte_max))
if self.halten == 1:
self.pwm4.ChangeFrequency(freq)