IR receiver receives only 0
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
    }
}