TPIC6B595 Shift Registers Controlling Multiple Steppers

Learn about switch statements.
I have used it to step through events (you can have many).
Look at case 1

for (byte i = 0; i < motors; i++) newPos[i] = 9216;

this 'for' loop selects all motors, and directs them to a "newPosition 9216"

  1. Wait until it's time to do something (8 seconds from start).
  2. Do something. 9216 steps away from position zero = 4.5 turns (down) for all motors.
  3. Go to case 2, where you wait for the next event.

Leo..