Arduino uno R3 stepper motor control

Imagine you were driving your car down the road and were about to make a turn- you have to do two things: judge if it's time to turn, and if it is, turn. (Ok three things- if it's not time to turn, don't.) Rinse and repeat that sequence of look/decide; look/decide.

The sequence is important, since it would be crazy to decide to turn before you had looked to see if you were at the crossing. Well the Arduino is dumber than soup until you give it some instructions, and it will decide then look if that's the order you code the instructions.

You may find it beneficial to look up flowcharting to help you model the program conceptually.... it's a bit old school and there are newer ways to model things, but nevertheless it's a good way of getting the sequence of steps, the algorithm, clear in your mind.