motor test

This commit is contained in:
Bernd Reuther 2021-03-04 15:06:52 +01:00
parent cafed2780a
commit eb32f05367
2 changed files with 6 additions and 2 deletions

View File

@ -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)

View File

@ -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