Redefinition of void setup

+1.

Take a look at the MobaTools Example 2 and perhaps reframe your question into how those State Machine States would have to be modified to 1) collect the target number of turns/steps, 2) reverse at the targetSteps OR hitting the limit switch, 3) stop and wait for a new turn-winding-cycle.