I have this optocoupler.
and this sensor.
I want to wire them together and use them for auto bed leveling. Note, stock Ender 3 board (Creality v1) has 2 pins for its endstop, not 3, so this:
won't work
However, I found this diagram:
My optocoupler is rated for 12 V so I definitely wont attach 24 V to it. However, everything else seems good. So I could only replace the 24 V to 12 V and it would work?