guys can anyone help me with coding

zeref_1996:
the motor rotates in both directions and jigs can anyone help with the coding to solve the problem

A jig is a bit lively maybe a 2 step or a waltz might be easier to program.