adafruit / Adafruit_CircuitPython_MotorKit

CircuitPython helper library for the DC & Stepper Motor FeatherWing, Shield and Pi Hat kits.
MIT License
86 stars 31 forks source link

Jittery stepper #49

Open MAbdelatti opened 3 months ago

MAbdelatti commented 3 months ago

I use the provided example code on my stepper. The motor rotates one or two cycles then the rotation stops and resumes multiple times.

Appreciate your help. here's the code:


from adafruit_motor import stepper
from adafruit_motorkit import MotorKit

kit = MotorKit(i2c=board.I2C())

kit.stepper1.release()

try:
    while True:
        print("Double coil steps")
        kit.stepper1.onestep(direction=stepper.FORWARD, style=stepper.DOUBLE)
except KeyboardInterrupt:
    kit.stepper1.release()