https://groups.google.com/forum/#!topic/makergear/4OTkvvvfqws
Quote
Polarity of the switch doesn't matter.
However, the RAMPS has three pins for each end-stop (to support optical
end-stops). So you have power, ground, and signal for each end-stop.
Wire them wrong so the mechanical switch shorts power to ground, and Bad
Things happen. :)