DC motor and limit switches

I've found a few posts about limit switches and stepper motors but nothing answered my questions for this application.

I have a vertical lifter that has a 12v motor raising and lowering the platform. I have limit switches at the top and bottom. On the test stand, it works fine, run power, they go up and stop. Reverse polarity and it goes down and stops. Great!

I want to control this with my Arduino Uno and my Adafruit Motor Shield. I know there are a few steps to read the limit switches and how to make things work, in software, as they on the stand. My goal would be to use the Bluefruit (Bluetooth) capability to remotely raise the platform, or lower it.

Limit switches seem to be a particularly challenging thing to work with! I struggled to figure out how to wire up the diodes in correctly for the test rig.

I'm still searching for some code snippets and tutorials....I appreciate your assistance!

I struggled to figure out how to wire up the diodes in correctly for the test rig.

Limit switches don't need diodes.

Wire one leg to ground. Wire the other leg to a digital pin who's mode is set to INPUT_PULLUP. HIGH will mean not pressed. LOW will mean pressed.

Below is a limit switch/diode setup for a regular dc motor (not a stepper motor).

reversemotor.jpg