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.
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?
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.