Noob question: decoding the IR remote

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
airazz
 
Posts: 2
Joined: Thu Dec 15, 2011 1:51 pm

Noob question: decoding the IR remote

Post by airazz »

So I got a kit together with an LCD screen, IR remote, IR receiver and IR LED. The plan is to make an adjustable intervalometer to control DSLR for timelapses via the IR.

I have already figured out the Arduino -> Camera part, the problem is inputting info into the Arduino using the remote. It's a no-name one, but it's nice and compact, with plenty of buttons. There are no markings on it and it's glued shut, so I can't check what's inside. Seller's page has no info either.

I'm using a Ladyada tutorial on IR remotes and I got stuck http://www.ladyada.net/learn/sensors/ir ... r_commands. I got really confused on how to decode the received signal. At the moment I get a wall of numbers, but how do I tell arduino that it's a signal and that it has to do something when arduino sees that signal? The main issue starts at the "IR Commander" part a bit further down the page. Sketch there is not complete and it's a bit confusing for me as a noob.

I tried running those sketches but messed up every time and all I get is a huge pile of errors when trying to compile it.

Any help is appreciated.

User avatar
airazz
 
Posts: 2
Joined: Thu Dec 15, 2011 1:51 pm

Re: Noob question: decoding the IR remote

Post by airazz »

An update, in case someone runs into a similar problem and needs help figuring out the problem.

So, with some help from Reddit arduino community, I found out that in Arduino 1.0 software the file WProgram.h has been renamed to Arduino.h and that breaks some of the older code. This is what was causing piles of errors when trying to compile the sketch to decode the IR signal.
All I had to do was just edit the IRremoteint.h file and change the line that mentions Wprogram.h to Arduino.h to resolve the issue.

I then used this tutorial to decode the signal, as it assigns individual HEX codes to each button, thus simplifying the whole process.

Chandler12
 
Posts: 1
Joined: Tue Jan 31, 2012 3:08 am

Re: Noob question: decoding the IR remote

Post by Chandler12 »

Could someone explain how to do the steps mentioned above? I keep getting the same errors, but I have no clue how to "edit the IRremoteint.h file"

Thanks for any help here....

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

Re: Noob question: decoding the IR remote

Post by philba »

grumble grumble... Arduino 1.0 - the newbie friendly release.

I'll give you windows instructions, on the mac someone else will need to chime in. Find the Arduino-1.0 directory in your Program Files (or Program File (x86) on 64 bit windows like W7) directory. Then into libraries and finally IRremote. The path on my machine is c:\Program Files (x86)\Arduino-1.0\libraries\IRremote You will see a file "IRremoteint.h". Open it with your favorite text editor, find the line #include <WProgram.h> and replace it with #define <Arduino.h>. Save it and then compile.

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

Return to “Arduino”