Irrecvdemo program in or remote library gives fatal error #include Whenever I compile irrecvdemo of or remote library it gives error saying that fatal error saying 


  no file or directory exists #include &lt;WProgram.h&gt;


#include &lt;IRremote.h&gt;

int RECV_PIN = 11;

IRrecv irrecv(RECV_PIN);

decode_results results;

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

void loop() {
  if (irrecv.decode(&amp;results)) {
    Serial.println(results.value, HEX);
    irrecv.resume(); // Receive the next value
  }
}
You are using a very old library on a modern IDE.  The file that was called WProgram.h in IDE version 0023 and below is now called Arduino.h.  You will need to change any references to WProgram.h to Arduino.h instead.

Well written libraries do this with a #ifdef block:

#if (ARDUINO &gt;= 100)
# include &lt;Arduino.h&gt;
#else
# include &lt;WProgram.h&gt;
#endif