This may be a general motor compatibility thing, but I'm not yet smart enough to under stand those.
I have a pi 4 and the Adafruit Pi Stepper/DC motor HAT and am trying to run a stepper motor off it.
The motor runs just fine backwards, but forwards seems to jitter, skip steps, and generally just not run smoothly. I've tried several different wiring combinations and they either result in the exact same thing (backwards good, forwards bad), or no motion at all.
Code is pretty basic:
Code: Select all
def stepper_checkout():
print('running checkout...')
kit = MotorKit()
for i in range(100):
kit.stepper1.onestep()
time.sleep(0.01)
for i in range(100):
kit.stepper1.onestep(direction=stepper.BACKWARD)
time.sleep(0.01)
* https://www.amazon.com/gp/product/B07TB74CL9/
* https://www.amazon.com/gp/product/B07TZTLJMT/
Would appreciate help and/or direction!