Infrared receiver gives only zeroes for results I bought a 37 in 1 sensor kit from Aliexpress. 

Now am trying to use the infrared receiver with a TV commander. 

My problem is that it returns as result only zeroes. The wiring is right. The code is from an example and includes not much. 

I did a serial print to see if the receiver is working. It gives zeroes back so it is working. 

I thought maybe a different library will help and downloaded irlib2 library and set the folders into the library folder. 

But it can not find it the library so i must use IRremote library. 

#include &lt;IRremote.h&gt;

const int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;

void setup(){
Serial.begin(9600);
irrecv.enableIRIn();
irrecv.blink13(true);
}

void loop(){
Serial.println(results.decode_type);

Serial.println(results.value, HEX);
if (irrecv.decode(&amp;results)){

    Serial.println(results.value, HEX);
    irrecv.resume();
}
}


What can i do to find what causes the zeroes?
I GUESS that it might be because of the following:


You declare results (it will be initialised to zeros)
In loop, you print the results.decodeType (which will be zero)
You then print results.value, which is still zero.
You then call irrecv.decode() which fails for some reason.
The code loops and starts printing lots of zeros.


You need to find out IF irrecv.decode() is failing and if so why. So add an else clause to catch it in the act.