Wrong direction and also not enabled on boot
This commit is contained in:
@@ -18,7 +18,8 @@ GPIO.setup(STEP, GPIO.OUT)
|
||||
GPIO.setup(DIR, GPIO.OUT)
|
||||
GPIO.setup(EN, GPIO.OUT)
|
||||
|
||||
GPIO.output(EN, GPIO.LOW)
|
||||
GPIO.output(EN, GPIO.HIGH)
|
||||
|
||||
|
||||
motor_thread = None
|
||||
|
||||
@@ -35,7 +36,7 @@ def motor_step():
|
||||
GPIO.output(EN, GPIO.LOW) # enable driver
|
||||
|
||||
print("Motor running...")
|
||||
step_motor(400, GPIO.HIGH, 0.001)
|
||||
step_motor(400, GPIO.LOW, 0.001)
|
||||
|
||||
GPIO.output(EN, GPIO.HIGH) # disable driver
|
||||
|
||||
|
||||
Reference in New Issue
Block a user