IR Remote "Playback" From Recorded Code

I've been following the tutorial for IR remote "recording" and "playback" found here: http://learn.adafruit.com/ir-sensor. It's a great tutorial but I think my problem is with my interpretation of my remote's output. When I read in the values from the IR emitter on the remote, the data looks like it's supposed to according to the tutorial. The problem is with sending it back out of the Arduino.

When I decode the remote's power button, I get:

Received:

OFF ON 63184 usec, 8880 usec 4340 usec, 600 usec 1620 usec, 560 usec 1620 usec, 600 usec 1600 usec, 580 usec 520 usec, 600 usec 480 usec, 600 usec 500 usec, 600 usec 500 usec, 580 usec 1620 usec, 600 usec 480 usec, 600 usec 1620 usec, 600 usec 480 usec, 600 usec 480 usec, 620 usec 500 usec, 580 usec 1600 usec, 620 usec 480 usec, 600 usec 500 usec, 580 usec 1620 usec, 600 usec 480 usec, 600 usec 520 usec, 580 usec 500 usec, 600 usec 500 usec, 600 usec 480 usec, 600 usec 1620 usec, 600 usec 480 usec, 600 usec 500 usec, 600 usec 1600 usec, 600 usec 1580 usec, 620 usec 1580 usec, 620 usec 1580 usec, 600 usec 1600 usec, 620 usec 480 usec, 600 usec 1600 usec, 580 usec 41400 usec, 8880 usec 2140 usec, 580 usec 28724 usec, 8860 usec 2140 usec, 600 usec int IRsignal[] = { // ON, OFF (in 10's of microseconds) 888, 434, 60, 162, 56, 162, 60, 160, 58, 52, 60, 48, 60, 50, 60, 50, 58, 162, 60, 48, 60, 162, 60, 48, 60, 48, 62, 50, 58, 160, 62, 48, 60, 50, 58, 162, 60, 48, 60, 52, 58, 50, 60, 50, 60, 48, 60, 162, 60, 48, 60, 50, 60, 160, 60, 158, 62, 158, 62, 158, 60, 160, 62, 48, 60, 160, 58, 4140, 888, 214, 58, 2872, 886, 214,

60, 0};

I've tried to put this in the format shown in the code at the bottom of the page here http://learn.adafruit.com/ir-sensor/making-an-intervalometer but it doesn't seem to be working (using the pulseIR() and delayMicroseconds() with the "on"/"off" values in the array).

I've verified that the IR LED is working and the code compiles/uploads. I noticed that in her code, there are repeating values in the array that can be removed but I couldn't see anything repeating in mine so I just used all of the values from my array in the pulses that go out.

I was wondering if anyone else had worked through this project and if they might be able to give some hints.

Thanks

Hi Atmega-ist,

I remember going through that tutorial a while back and like you ran into the same issues. Its a great tutorial learn concepts but in practice I had troubles too. I think the the problems were mostly due the fact that the various standard IR protocols out there are structured so differently, and that the individual devices which recieve these signals can be unforgiving with innacuracies in your transmissions.

In the end I ended up using and liking this most excellent library from Ken Shirrif which supports multiprotocol send+receive, if you're not already aware of if give it a shot:

http://www.righto.com/2009/08/multi-protocol-infrared-remote-library.html

Skorn -

Thanks so much for the reply.

I've downloaded and extracted the library into the proper folder and pulled up an example sketch but it won't compile. I'm using Arduino IDE 1.0.3 and I got the code from the Arduino 1.0 link in the blog at the top of this page: http://www.righto.com/2009/08/multi-protocol-infrared-remote-library.html.

For example, if I try to compile IRsendDemo, I get the error "undefined reference to `IRsend::sendSony(unsigned long, int)'". I've looked in the header and .cpp files and these classes seem to be there.

I have a feeling this has to do with where I'm storing the files. I've tried it in the Arduino "core" >> libraries directory and in the sketchbook >> libraries directory with no success.

Any ideas?

Thanks again

Hi,

The explicit instructions for using this library are in the readme file in the library. Ensure the library is in a folder named exactly "IRremote". Make sure it is installed in the following directory structure:

After installation you should have files such as: arduino-1.x/libraries/IRremote/IRremote.cpp

From experience, I found you need to restart the arduino IDE for it to recognise the library.

I’m almost embarrassed.

Glossed right over the “Unzip it and rename the directory shirriff-Arduino-IRremote-nnn to IRremote” line in the readme.

It’s working great now!

Thanks so much, Skorn.

Great! Glad you got it working.