Step motor controller and Limit switch