IR Detector (How do I hook it up)

Mine is wired as in the

Mine is wired as in the example that CaptainTuna posted above. I’m using a PICAXE 28X1 and the IRIN command, which has a timeout. For me, using a 100 ms timeout, but calling the routine very often, works well.

I was amazed that it was so easy. For less than $15, including the infrared receiver chip, the resistors, capacitors, and a universal TV remote, I had remote control capability. (I set the remote up as Sony code 00.)

IRIN reads a number from the infrared receiver chip, and places it into a variable of your choice. Each button of the TV remote will send a different value. I experimented a bit (using DEBUG) to map out what button transmitted what number. You then use the value of the variable in your code to call the actions that you want.

It’s so easy, a caveman could do it.

Duane S

Wilson, North Carolina USA

i don’t really get what is a

i don’t really get what is a timeout for (be advised that i’m not an expert). Why to keep calling the routine often instead of making a longer timeout? What’s the gain?

Thanks for the answer :slight_smile: I’m gonna try IRIN!

As I understand it, during

As I understand it, during the timeout period, the PICAXE is waiting for a signal from the IR reciever. During this time, it will stop execution of the program.

By using a short timeout, but calling the routine often, program execution can continue, yet you get qucik responses when you press a button. At least that’s what works for me. Others may have better strategies, and I’d enjoy hearing about them.

Duane S

Wilson, North Carolina USA

ah ok i got it…i was
ah ok i got it…i was thinking about using a slave microcontroller for receiving.

I think this may help

I think this may help :

www.rev-ed.co.uk/docs/AXE040.pdf

 

I eventually bought these
I eventually bought these sensors, but they are very different from the ones I was trying to get working in this post.