Blue wire is not the signal wire.
If you have connected the brown wire to 12 volt, you may have damaged the endstop port on the mega.
Your probe is showing as a NPN NO type so the best way to connect it is as follows
NPN probe
Any diode should be ok, i use a 1N4148 type
If you have connected the brown wire to 12 volt, you may have damaged the endstop port on the mega.
Your probe is showing as a NPN NO type so the best way to connect it is as follows
NPN probe
Any diode should be ok, i use a 1N4148 type