I got an Inductive Proximity Sensor (https://www.mysick.c...ProductID=51476), which I'd like to read the output from with my Netduino.
It's a DC 3-wire PNP NO and I give it 24V.
See attachment for the setup.
The censor seems to work fine, when triggered it gives 24V in output and 0V when not triggered.
I've made a voltage divider which brings the sensor output down to ca. 4V and my multimeter confirms that.
But I can't read that value in Netduino, this little program outputs only "true"
public static void Main() { var ip = new InputPort(Pins.GPIO_PIN_D1, true, Port.ResistorMode.PullUp); while (true) { Debug.Print("ip.Read() = " + ip.Read()); Thread.Sleep(1000); } }
I'm definitely not an electronic master mind, so any help with my setup is appreciated.
Thank you
Kristoffer
EDIT: attached file, sorry!