Some suggested using a pull up resistor (10k) from Vcc to +5V and I tried that with no success. I have found some pages with info, but none on my specific type of sensor.
Now when I try with a similar setup, all I get is a 0 output when trying both digital and analog Reads. The site I was ordering from did not have any of the same Totem-Pole sensors in the inverted version (OPB972.) so I ordered the OPB971 and OPB973 Open Collector versions. The problem is I need it to be inverted and give me a 0 when it is unblocked and a 1 when it is. It gave me a 1 when it was unblocked and a 0 when the flag was in the slot just like it should. Sensor: Vcc - 150 Ohm Resistor - +5V (from Arduino) Everything was fine in my setup, I had:Įmitter: Anode - 150 Ohm Resistor - +5V (from Arduino) I was using an Optek OPB970N11 as an optical limit switch on a project.