corb

IR Remote controllers for Arduino are super cheap and quite useful. Unfortunately all the libraries I've seen used polling, which makes them tough to use in a project. So, I wrote an interrupt driven IR remote library. This makes it really easy to have your project doing all sorts of activities and still be able to receive IR remote controls. It uses PCINT, so the IR controller can be on any interrupt handling pin (including support for PCINT on Mega 2560). You can download the lib from here: http://www.zbotic.com/index.php/download/

Note that zipfile includes other libraries - for just the remote control, only unzip IRController, Device, and PCInterrupt. Also, this has codes for one type of remote - you will likely have to replace the codes with your remote's codes.

After one keypress I can keep smashing buttons but nothing new will come in on the Serial Monitor.

I've tried with this code: http://www.sparkfun.com/datasheets/Components/General/Cheapo_IR_Control.pdeAnd it works fine, except that I can't use that code in my project because I need it to run in real-time.

Hi guys, I am getting a weird result in the Serial Monitor when receiving remote commands. On each button press, Raw Val is a different number! Also the Bits rcvd field seems to retain the bits long after I let go of the button. Is that supposed to happen? I'm reading over ircontroller.cpp but haven't quite understood it all yet. Thanks for any suggestions you have!

jeffmorris

IRControllerTest.cpp:3:26: error: IRController.h: No such file or directoryIRControllerTest:7: error: 'IRController' does not name a typeIRControllerTest.cpp: In function 'void setup()':IRControllerTest:11: error: 'controller' was not declared in this scopeIRControllerTest.cpp: In function 'void loop()':IRControllerTest:19: error: 'controller' was not declared in this scope