Your coding style looks good to me. Clean and precise. To each his own
If I had to code this, I would probably avoid the 'branch'es and use a 'select case' right inside the Left side / right side operations routines. Reason being, there is very little else that you're doing in the branches.
Another thing you can consider is using a table to fire the stepper motors instead of using the step0,1,2,3 idea. In the table you could just load the 4 bits of the stepper which you need to load at every step. It will probably save you the select case and the branch too. I won't elaborate on the idea. You can figure it out yourself.
Bookmarks