Using attach() and detach() function on a stepper motor with a easy drive.