So I am using a Seeeduino XIAO as my microcontroller which then connects to a ULN2003 board connected to a 28byj48 Stepper Motor. I have wired the Digital I/O pins from the XIAO as D1 -> In1 D2 -> In2 and so forth on the driver board. I am also using the 5V output from the XIAO to power ULN2003 board. I have been looking at the documentation for Circuit Python and Stepper Motors and can't figure out what's wrong with my code (or alternatively if my wiring is the problem). Below is a snippet of my Code:
import board from digitalio import DigitalInOut from adafruit_motor import stepper pin1 = DigitalInOut(board.D1) pin2 = DigitalInOut(board.D2) pin3 = DigitalInOut(board.D3) pin4 = DigitalInOut(board.D4) motor1 = stepper.StepperMotor(pin1, pin2, pin3, pin4) for i in range(100): motor1.onestep() time.sleep(.01)
I am unsure if I am even initializing the motor correctly, so any help would be appreciated!