IR Remote Kit is only returning 0 when I press buttons on remote

So I got a IR Remote from Amazon. This one to be precise.

And I am using it with an Arduino Uno.

When run this code and then press buttons on my remote I only get a 0 no matter what button I push.

   IRremote: IRrecvDemo - demonstrates receiving IR codes with IRrecv
   An IR detector/demodulator must be connected to the input RECV_PIN.
   Version 0.1 July, 2009
   Copyright 2009 Ken Shirriff

#include <IRremote.h>

int RECV_PIN = 7;

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()
  irrecv.enableIRIn(); // Start the receiver

void loop()
  if (irrecv.decode(&results))
    Serial.println(results.value, HEX);
    irrecv.resume(); // Receive the next value

So then I tried running the Dump code found here.

And that doesn’t seem to help either.
The first time I ran it I got this in my Serial Monitor:
“Some Timer conflicts, with other libraries, can be easily resolved by configuring a different Timer for your platform”

Then I ran it again and I get this:

  • IRremote.h
  • You can save SRAM by disabling the Decode or Send features for any protocol (Near the library
  • IRremoteInt.h
  • IRremote.h
  • You can save SRAM by disabling the Decode or Send features for any protocol (Near th⸮⸮⸮We⸮u!⸮

Any ideas what could be causing this? This is my first attempt at using a IR Remote and I dont know if I am doing something wrong? Or if I got a bum reciever?

I'm missing the wiring diagram in your post!

The first time I ran it I got this in my Serial Monitor:
"Some Timer conflicts, with other libraries, can be easily resolved by configuring a different Timer for your platform"

That's just the last line of the serial output of the sketch. It's written in every case even if there's absolutely no problem with timers.

Any ideas what could be causing this?

Communication problems or an unstable Arduino (may be a hardware problem or a driver problem on the PC. Do you use an original Arduino UNO?

Thanks for the reply. To add some extra clarity…

This is the exact Arduino Uno I ordered from Amazon.

I already posted the Code I used to test.

Here is a link to the library I am using.

As far as a wiring diagram goes…I don’t have an image atm. So I will just explain it.

I have the Gnd on the IR and the Gnd on the arduino hooked up to a 5V power supply so that they are grounded together.

The Arduino is pulling power from the USB via computer atm. And the Red on the IR is also hooked up to the 5V power supply.

The S output on the IR is going to the 7 pin on the Arduino.

Nothing else is hooked into the system atm.

I have ordered 2 different IR receivers from Amazon that should be delivered tomorrow. Hoping this is just a case of my IR having an issue or being a lemon. We will see I guess. I have a friend who has one he got in a kit that is hooked up in basically the same way. He ran the same code I posted here on his and it returns a bunch of HEX values like it should with no issues.

Anything else you need to know?

Here is a picture of how its all wired up.

Assume you tried a new 2025 battery in the remote.

Maybe try different wires.

BTW, the code in the OP works fine here.

You are going to have to investigate your IDE installation.

That IR receiver module has a led on it which should flash during a burst of pulses from the remote control. If it doesn’t, have you a TV or other remote control device which you could try?
The remote control which you have purchased, incidentally, uses the NEC IR protocol.

I have not tried a different battery, but the one in there is triggering the LED no problem. I have not tried using different wires but since it is getting a signal and returning something I assume that isnt the issue. I will test different wires anyway just to be sure.

Yes the LED blinks when I press a button on the remote.

@larryd, could you elaborate on "Investigate your IDE installation"? I know what that is, but I have no idea how to troubleshoot it or what I should investigate to figure this out. Short of trying a completely new IR Receiver I am not sure what else to do at this point. I am very new to all of this so keep that in mind.

Completely new set of wires does absolutely nothing to change it. Same results.

Hopefully this helps you see what I am dealing with... Let me know if this video does not work for some reason.

Some of the examples for the library use pin 11 for the receiver module. Example:

Try changing your code and wiring to match.

I’ve seen reports of a number of similar issues recently (zeros returned by the IR code). There has also been a lot of activity in the IR library recently. A error may have been introduced.

Maybe reinstall the library and/or open an issue on GitHub.

And this:

I tried the code in your first post, the IRreceiveDump one. When I run that in pin 11 I get this printed back to me.

Yeah those other issues you posted are the same thing. hmm.

I just downloaded what I thought was the version 3.0.0 of the library and reinstalled it. But when I look at it in my Library Manager all I see is version 2.8.1. That wasn't working. But then I switched it to version 2.8.0 and BAM!!! Its working!

So now the people managing this code need to know that version 2.8.1 is bad and nuke it from the universe!!

Adding a graphic here to help anyone else who may come across this because this is not very obvious to people who are new to Arduino. And its about the most frustrating thing imaginable.

Good news !



warning: ‘bool IRrecv::decode(decode_results*)’ is deprecated: You should use decode() without a parameter. [-Wdeprecated-declarations]
if (irrecv.decode(&results))

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.