Learn how to stop a DC motor when the limit switch is touched. How to change the direction of the DC motor when the limit switch is touched. How to use the limit switch, DC motor, and Arduino. The detailed instruction, code, wiring diagram, video tutorial, line-by-line code explanation are provided to help you quickly get started with Arduino. Find this and other Arduino tutorials on ArduinoGetStarted.com.