I am new here so patience and indulgence are welcome
I did my first basic projects but now I decided to do something more complicated. In my project I use stepper motors (28BYJ-48). I read the libraries functions but I still dont know how to make them run continously. In my project I need to move some flap until homing button is pressed.
Here is part of some sketch I found. It makes my motors move but just for some period (600 steps I assume):
I don't know too much about the ULN2003 and the "direct" method to drive a stepper.
As I am working with stronger motors I am used to drivers (starting with a drv8825 and up to Gekko drivers) which drive the motor just by getting "step/pulse" and "direction" from the Arduino. But your configuration should work nevertheless with your configuration.
The sketch #1 in the tutorial tells the stepper to go to a position "20000", counting down the distanceToGo and it that == 0, it should reverse and go to "-20000".
Ref to AccelStepper library: the library is limited to about 4000 steps/sec - which means in your case, that your motor (due to the gear) can only turn about 60 RPM - is that ok for you?
Pls check the wiring again and post it so that we can exclude any wiring issues.
pls post your complete sketch - it is impossible to guess what you are really doing; if the code lines of your first post is the only instruction in your main loop - then your motor is just moving 600 steps and then it will stop - provided that there is no more instruction.
So - pls post your full sketch and tell us what you want to accomplish.