Spindle control

Here is my solution,