I developed this infrared remote control decoder for Arduino on my Arduino-compatible STK500 evaluation board for Atmel’s AVRs.

The sketch is pretty much standard C code so porting to non-arduino dev systems is almost immediate.

Remote control receiver / decoder for Arduino

I actually developed the code in C for a smaller ATtiny24 for a specific project underway thenI adapted it for Arduino and made available to anyone whom might need it.

The sketch expects the IR receiver on digital pin 8 and is in the form of a demo where 4 LEDs on digital output 4, 5, 6 and 7 are turned ON on my STK500 (microprocessor’s output connected to LEDs’ cathodes) when keys 1 2 3 and 4 are received from the remote. The power button on the remote turns all LEDs OFF.

The code also ouputs the received code to the serial port to be read on the serial console (9600 Baud-8-N-1) .

Any RC5 Philips TV remote control seems to be fine and the few programmable ones I tried work fine. Feedbacks are welcome.

…yes, one day I`m buying a real Arduino !

The sketch for Arduino is here.

IMPORTANT : should you experience problems with random resets, read Mark Arduino’s comment on Jan 24, 2010 at 1:06 pm.

Enjoy.