Go Down

Topic: IR Interfacing (Read 2929 times) previous topic - next topic


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).


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


What is the modulation frequency of your remote, and what is the resonant frequency of your detector?
"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.


Jan 17, 2011, 11:07 pm Last Edit: Jan 18, 2011, 02:13 am by davekw7x Reason: 1
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.



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.)


Jan 18, 2011, 12:11 am Last Edit: Jan 18, 2011, 12:12 am by GregaG87 Reason: 1
Another vote for Ken Shirriff's IRremote library, all remotes worked with it except 1 :-?

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131