View Full Version : ir sensor
01-26-2010, 06:02 AM
am trying to use an ir led and ir sensor but the input pins keeps repeating a sequence of 1 and 0 even when nothing is connected to it
01-26-2010, 06:04 AM
Post reply, attach code, attach drawing of circuit.
01-26-2010, 06:09 AM
here is the code
i connect the ir sensor signal pin throught a 1k ohm and the transmitter throught a 220 ohm.
01-26-2010, 06:37 AM
The IR-Sensor signal pin is an 'active-low' signal. This means, you need to tie this signal to +5 through the 1K ohm resistor. When the IR-Sensor detects a signal, it will then 'pull' the pin low.
Alternating 1's and zero's indicates the pin is 'open', acting as an antenna.