Pages: [1]   Go Down
Author Topic: IR Interfacing  (Read 1900 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 9
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So i'm trying to read IR codes from a Remote control. I've been working on it for a couple days or so and I seem to have a dead end. From what I've read, you need to read in using PulseIn (pin, LOW) and those values determine the binary values that compose the key code.

Anyway, I've basically been messing around this this code, but all of my PulseIn values are always 0, no matter how much I mash the buttons or hold them down (I output the pulsein live with serial out).

My remote that I'm trying to use is the Quasar EUR501374

I'm happy to put anything people want up, but I'm not totally sure what would be helpful (this is my first time doing this sort of thing).

Thanks!

Oh, and my ir reciever is this one: http://www.sparkfun.com/products/10266
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 290
Posts: 25806
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What is the modulation frequency of your remote, and what is the resonant frequency of your detector?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Left Coast, USA
Offline Offline
Sr. Member
****
Karma: 5
Posts: 499
Sometimes I just can't help myself.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I highly (and heartily) recommend that you consider using Ken Shirriff's IRremote library.  Read all about it (and lots of Infrared Remote stuff) here: Ken Shirriff's blog.  It is designed to work with modules like yours.  (I use a different receiver, but the principles are the same.)

</begin opinion>
If you want to implement a minimal amount of code to work with your specific controller, a good way might be to use Ken's IRrecvDemo and IRrecvDump examples as a starting point and then simplify to your heart's content.  (For example, you can start by leaving out all of the IRsend stuff if you are only interested in receiving.)  See Footnote.
</end opinion>

That's just an opinion and it's worth exactly as much as you want it to be worth.

Regards,

Dave

Footnote:
Here's my methodology: Start with something that works.

Then try making it "better" (smaller, faster, more elegant, whatever...)

The worst case fallback position is that you have something that works.

You might even learn something by looking at other people's approach to problem solving (and other people's code) even if your way is "better."  (Note that Ken's excellent code doesn't have a single PulseIn function call, in spite of what you have read somewhere.)
« Last Edit: January 17, 2011, 08:13:58 pm by davekw7x » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 38
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Another vote for Ken Shirriff's IRremote library, all remotes worked with it except 1 :-?
« Last Edit: January 17, 2011, 06:12:13 pm by GregaG87 » Logged

Pages: [1]   Go Up
Jump to: