Problem of using stepper motor 17HS4401

Try this Simple Stepper Code

Post a link to the datasheet for your motor.

What power supply are you using for the motor (volts and amps).

Make a pencil drawing showing clearly how everything is connected and post a photo of the drawing. Don't worry if you are not an artist - crude but clear is fine.

...R
Stepper Motor Basics