Mendel auto bed leveling with an inductive sensor (No.3)

Wiring between NPN inductive sensor and RAMPS 1.4
抵抗値については電子回路の知識が浅いので、適当です。Signalが5V<->0Vと変化し、大電流が流れなければOK(数十mA程度でOK?)。
写真に、RAMPSで12Vが取れる箇所を2箇所しめしました。便利な方を使うと良いかと。

配線完了。

I do not know much about electronics so I'm note sure what the resistance of R1 and R2 are the best.
The point is the voltage across R1 provides a TTL signal and the current through it should not be to too much (a few ten mA range?).