motor test
This commit is contained in:
parent
220cd6610d
commit
ec3e3d0ba3
@ -14,7 +14,7 @@ for pin in pins_out:
|
|||||||
for pin in pins_in:
|
for pin in pins_in:
|
||||||
GPIO.setup(pins_in[pin]['nr'], GPIO.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)
|
GPIO.setup(20, GPIO.OUT)
|
||||||
m3_pwm4 = GPIO.PWM(20, freq)
|
m3_pwm4 = GPIO.PWM(20, freq)
|
||||||
|
@ -52,6 +52,12 @@ class motor():
|
|||||||
self.pwm4 = GPIO.PWM(self.sp4, self.freq)
|
self.pwm4 = GPIO.PWM(self.sp4, self.freq)
|
||||||
self.pwm4.start(0)
|
self.pwm4.start(0)
|
||||||
|
|
||||||
|
def stop(self):
|
||||||
|
self.pwm1.stop()
|
||||||
|
self.pwm2.stop()
|
||||||
|
self.pwm3.stop()
|
||||||
|
self.pwm4.stop()
|
||||||
|
|
||||||
def vorwaerts(self, schritte):
|
def vorwaerts(self, schritte):
|
||||||
ges_schritte = schritte * 8
|
ges_schritte = schritte * 8
|
||||||
#print(str(ges_schritte))
|
#print(str(ges_schritte))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user