IR receiver receives only 0 I am trying to decode IR codes of my Samsung tv remote
But the receiver always receiving &quot;0&quot;
Schematics:

Code:
#include &lt;IRremote.h&gt;      

int RECV_PIN = 11;        
IRrecv irrecv(RECV_PIN);
decode_results results;
 
void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn();
}
 
void loop() 
{
  if (irrecv.decode(&amp;results)) 
    {
    int value = results.value;
    Serial.println(&quot; &quot;);
    Serial.print(&quot;Code: &quot;);
    Serial.println(results.value); 
    Serial.println(&quot; &quot;);
    irrecv.resume();              
    Serial.println(&quot;*****************&quot;);
    }
}

Please help me to decode my IR codes
Next update with 3.1 of the library, you need to call irrecv.decodedIRData.decodedRawData to get the data. This code worked for me:
#include &lt;IRremote.h&gt;

int IRpin = 11;
IRrecv irrecv(IRpin);

void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
}

void loop() 
{
  if (irrecv.decode()) 
    {
      Serial.println(irrecv.decodedIRData.decodedRawData); // Print the Serial
      irrecv.resume();   // Receive the next value
    }
}