Arduino IR Remote library not working

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
ahdavidson
 
Posts: 131
Joined: Wed Jun 03, 2009 9:59 am

Re: Arduino IR Remote library not working

Post by ahdavidson »

Yes. I understand.

1. The routine does not wait forever with a zero value for the parameter; I still get -1 returns. There is some discussion about this earlier in this thread, but I don't think the library has been updated.

2. In any case, I can't afford to wait for even 1 second. I have other timings in the loop that need to be checked at least every 50 milliseconds, if not less.

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Arduino IR Remote library not working

Post by adafruit »

there is no other option in the library - there is no interrupt-based IR reading code in there and we have no plans to write an interrupt-based system nor do we have a tutorial on how to write that kind of code, or know of any code that can do what you're looking for

User avatar
philba
 
Posts: 387
Joined: Mon Dec 19, 2011 6:59 pm

Re: Arduino IR Remote library not working

Post by philba »

I don't think an interrupt driven reader is all that hard if you are using a receiver like one of the Vishay TSOP devices. Basically, it's just taking an interrupt, reading the time, determining if it's a mark or space (based on rising or falling edge) and saving it away. The main loop can know to retrieve the sequence if the current "space" is longer than some predetermined period.

madworm_de
 
Posts: 99
Joined: Mon Jun 09, 2008 6:56 am

Re: Arduino IR Remote library not working

Post by madworm_de »

Have a look at this. It works quite nicely and is pin-change interrupt based. No protocol decoding, just comparing raw data.

User avatar
serioussam
 
Posts: 1
Joined: Tue Feb 07, 2012 7:50 pm

Re: Arduino IR Remote library not working

Post by serioussam »

I think I found the problem for the adafruit mini remote control. It does not properly follow the NEC protocol.
It sends "0 191" instead of "0 255" for address and checksum followed by correctly coded command and checksum.
I attached my C source that runs on an arduino.
Attachments
main.c
(2.89 KiB) Downloaded 231 times

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”