Tevo Tarantula auto bed leveling config
An NPN sensor is wired differently from a PNP sensor. The signal wire is the black wire, blue is the ground wire.

According to this posting, Don’t trust the internet (and how to add an Inductive Proximity Sensor to your 3D printer the proper and easiest way, you need to insert a 6.8&nbsp;k&ohm; resistor in between the black and the blue wire, I quote:


  ...Indeed, all we need to do is add a single 6.8&nbsp;kΩ resistor between BLACK and BLUE and all should work fine.




Alternatively, a diode in the black wire would also work, I quote:


  ... So I did test using a diode and that also works perfectly fine, simply because the direction in which the 12&nbsp;V current would like to flow when the sensor is open will be blocked by the diode. The internal (or hardware) pull-up still pulls the Atmega’s sensor pin to HIGH however.





  ... 
  But as soon as the sensor is closed, the diode would allow the 5&nbsp;V current to flow in the opposite direction towards ground, which pulls the Atmega’s sensor pin to LOW.