PDA

View Full Version : ir sensor



eagle4ces
01-26-2010, 07: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

Franklin
01-26-2010, 07:04 AM
Post reply, attach code, attach drawing of circuit.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen

eagle4ces
01-26-2010, 07:09 AM
here is the code
do
freqout 7,1,38000
debug?in15
loop


i connect the ir sensor signal pin throught a 1k ohm and the transmitter throught a 220 ohm.

allanlane5
01-26-2010, 07: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.