I'm trying to make a stepper motor go forwards and ackwards for a certain number of seconds but when I do this code the boolean array does not alternate. I've tried the same setup but just with a signal in the program and it works so I do not understand why it doesn't work in this setting.
You inner loop will never stop because the stop button is only read before the FOR Loop even starts. You need to move the control to be inside of the While Loop. Then, when you press stop, you will see the opposite condition.