Connect RAMPS 1.4 Optical Endstop to Arduino Nano [solved]

Hello,
I'm attempting to connect a RAMPS 1.4 Optical Endstop to an Arduino Nano but I don't know which pin to connect the signal wire from the endstop to the Nano.

Any tutorials I have found online deal with the Mega 2560, I can't compare the two. Can anyone shed light on my problem?

Post a link to the vendor where you bought it.

You should research opto-interrupters.

You have a breakout board so it probably already has the collector pullup resistor.

Do this:

Connect the endstop power & gnd to the arduino.

Get a meter and measure the voltage on the signal pin while placing a coin in the interrupter and then removing it.

Is the signal normally high and then LOW when interrupted or
normally low and then HIGH when interrupted ?

Connect the signal to any digital input and use digitalRead

Seriously, you should do your due diligence and learn something about electronics before messing around
with whatever it is you are doing.

What you are doing is like driving a car without knowing how to change a flat tire.

I connected the signal wire to a digital pin and it works. The signal goes from HIGH to LOW when interrupted.

Thanks for your help.