Atmospere Stepper Motor Board

This board was recycled from the Stepping Motor Clock, but uses only one motor instead of its two. Its a different motor, recycled from a printer.

There are connectors for the motor, the Sensor Board, the programming connector and the opto-interrupter which re-indexes the pointer. The normal command from the Sensor Board is "A" through "s" for 0-49, but if bit 7 is set the pointer is first re-indexed to 0. The motor turns clockwise until a pin passes into the opto-interrupter, then it completes the re-index by going a fixed number of steps.
Re-indexing is also performed at power-up, with a full rotation.

In normal operation it calculates the number of steps to go to the new position by the shortest direction.

Here is the circuit diagram

Here is the code