I am sorry for bothering you with an urgent question; I had an IR light barrier connected to a piece of work of mine. Yesterday it found out that it's too slow, and so I decided to buy a laser light barrier. I connected it to a 12 V DC adapter (it works!). Now I want to connect it to my Arduino and I don't know how I should make the connection.
I know which cable I have to take (it's only one, since there is no relais); and I need a 10 k resistor (I was told so) and a gnd to connect it, right? But in which order?
A connected brown (12 V) and blue (GND). And black to another cable which goes to digitalport, then a 10 K resistor and after the resistor another gnd.
If you are using one of the varieties with an NPN output, then what you need is:
Blue to ground
Brown to +12v
Black to Arduino input pin
Either enable the internal pullup resistor on the Arduino pin, or connect a pullup resistor (suggest 1K to 10K) between the pin and +5v.