Accelstepper library arduino. At the closed position the valve hits a limit switch.