The IR receive shows that the decode(&results)) the function is deprecated and may not work as expected! Simply use decode() without any arguments.
#include <IRremote.h> // IRremote Library Statement
int RECV_PIN = 11; //Define the pins of the IR receiver as 11
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start receiver
}
void loop() {
if (irrecv.decode(&results))
{
Serial.println(results.value, HEX);//Output receive code in hexadecimal newline
irrecv.resume(); // Receive the next value
}
delay(100);
}