Arduino uno boat lift control

The encoder would be attached to a shaft on the gearbox that will drive the pipe. the only way it can move is if the motor is turned. The encoder as a limit switch os more for convenience and not safety as most systems do not have and limit switch at all. Power to the motor will be cut off when away so no one can tamper with it.