Arduino code to rotate stepper motor with two distinct modes of operation.