Thanks Leo, I understand switch statements.
To learn how shift registers work, I read articles and followed the tutorials I could find.
All the tutorials on the net regarding shift registers refer to LED's.
I followed one of these, hooked up some LED's and learned the principles.
Then I tried to modify your code for another project I'm doing ( I've postponed the BMW one cause I don't think I'm up to it for now).
In this project, much simpler, I need to move 41 steppers all together at slow speed to an array of prefixed positions and stay there until a PIR sensor is triggered, then move to the next prefixed position and so on.
I tried to simplify your code, taking out sequences, millis, micros, speed and torque keeping the essential part of your goPos function but somehow I'm goofing up somewhere.
I just need to read the current position from the EEPROM on power up, calculate the steps I need to go to one of the prefixed positions and move all the steppers there. Then update the EEPROM with the new position.