Skip to content

Launchpad IR Reception

After scavenging an IR receiver from an old set top box, I thought it’d be interesting to try and get it going on the Launchpad.

Download the code here.

I started out by reading about the RC-5 protocol and trying to write a decoder, but it turns out that my TV remote is doing something else. Rather than write a custom decoder which only works for my device, I thought I’d post up my test code.

The code watches for pulses on P1.6 (IR_BIT) and accumulates pulse timings into an array. Once enough have been gathered they’re dumped to the serial port (TXD on P1.6).

If you comment out the DUMP_RAW_PULSES #define, a simple decoder for my Samsung remote is enabled. It searches for a sync pattern of two long pulses, one low, one high before decoding a train of long and short pulses. From what I see on the scope, it doesn’t look like the Manchester encoding from RC-5.

Ladyada has a great Arduino tutorial on matching pulses to known codes.

Categories: Uncategorized.

Comment Feed

2 Responses

  1. any chance you could post the code as a zip file, please?

  2. @Michael The code is tarred and gzipped. It’s just that wordpress has changed the name. Rename it to ir.tar.gz and open it in WinZip/WinRAR etc.

    Or for unix:
    tar xfv ir.tar.gz



Some HTML is OK

or, reply to this post via trackback.

Security Code: