Infra IN issue

kam

Member
Hey guys,

I wanted to make an Ir reciever board, using the infrain command. But although the circuit is fine, the syntax is fine, i cant get any data out on to the terminal.

My basic test code on the transmitter is:

Code:
; Transmitter. 08M. IR LED on out0 (infraout pin)
main:

for b1 = 1 to 10

infraout 1,5
pause 45

next b1

goto main
My Code for the Infra IN side is an 18X, connected on the Infrain Pin, and all the components are correct, i've checked and rechecked.

Code is simple:
Code:
main:

infrain

sertxd(infra,cr,lf)

goto main
Now, it should work, right?

I was searching around on the forum and i found out that if i connect a Piezo buzzer i can hear the Pulses. i did that on both the Tx and Rx. seems to be working fine, i can hear stuff.

Someone also said that we can also use the pulsin command to get the pulses in and then translate them... well when i did that, i used a TV remote, not a Sony one though... but the thing is that the pulses that are coming in to the terminal are different everytime i press the same button, depending on the duration i suppose. At one stage they settle down to a certain value... think it was 20...

Anyway, considering the situation. if i was to make an IR remote sensor, and the end user didnt know how long to press the button for, how will my system be able to understand that its the same command... and ignore the rest...

Im not sure if i made that clear or made it worse... but hoping that i can get some answers

Thanks

Kam
 

eclectic

Moderator
@kam

As a first step, I'm assuming that you have all the
correct components, correctly wired.

Can you “see” the IR led?
(Many digital cameras can “see” IR).

Can the receiver see the LED?
Try moving them closer.

Try changing your receiver code to
Code:
main:

infrain

sertxd (#infra,cr,lf)
sertxd (infra,cr,lf)
sertxd (“Input OK”,cr,lf)
goto main
e
 

BeanieBots

Moderator
Infraout sends a whole steam of pulses of differing lengths depending on what data is being sent. Hence, if you use pulsin, it will only capture ONE of the many pulses sent. There is no way telling which pulse it has captured. All it tells you is that SOMETHING was sent and SOMETHING was received.

When you say the "circuit", which circuit exactly?
What are you using to detect the IR?

Maybe post a picture of your circuit. People here are very good at spotting something others may have missed.
 
Top