I am new to the Arduino, I have some very basic knowledge learned online. I have a program that will control level crossing gates on my model railway. It works very well, however I am using a simple stepper command from <stepper.h> the motor is the 28BYJ-48 with the ULN2003 driver board.
Where (gateOpen) is 512 which equates to 90 degrees of rotation. This works just fine, however I have to run the stepper slowly because I need the gate to take around 6 secs to close. While the stepper is running the program stops until it has completed. Is there a better way to do this where the program will continue to run while the stepper completes it's 512 steps?
Thanks for any ideas.