Problemi libreria IRremote

Salve a tutti, sono nuovo del mondo arduino e stavo provando un paio di cose con il mio mega e il ricevitore IR;
allora io scrivo un semplice sketch che dovrebbe scrivere il codice ir a seriale:

#include <IRremote.h>

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(&results)) {
    Serial.println(results.value, HEX);
    irrecv.resume(); // Receive the next value
  }
}

Ora lo invio ma in compilazione mi da un errore che non comprendo:

In file included from /Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:13:
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremoteInt.h:87: error: 'uint8_t' does not name a type
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremoteInt.h:88: error: 'uint8_t' does not name a type
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremoteInt.h:89: error: 'uint8_t' does not name a type
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremoteInt.h:92: error: 'uint8_t' does not name a type
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp: In member function 'void IRsend::mark(int)':
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:173: error: 'delayMicroseconds' was not declared in this scope
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp: In member function 'void IRsend::space(int)':
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:181: error: 'delayMicroseconds' was not declared in this scope
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp: In member function 'void IRsend::enableIROut(int)':
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:200: error: 'OUTPUT' was not declared in this scope
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:200: error: 'pinMode' was not declared in this scope
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:201: error: 'LOW' was not declared in this scope
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:201: error: 'digitalWrite' was not declared in this scope
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp: In constructor 'IRrecv::IRrecv(int)':
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:217: error: 'volatile struct irparams_t' has no member named 'recvpin'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:218: error: 'volatile struct irparams_t' has no member named 'blinkflag'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp: In member function 'void IRrecv::enableIRIn()':
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:241: error: 'volatile struct irparams_t' has no member named 'rcvstate'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:242: error: 'volatile struct irparams_t' has no member named 'rawlen'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:246: error: 'volatile struct irparams_t' has no member named 'recvpin'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:246: error: 'INPUT' was not declared in this scope
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:246: error: 'pinMode' was not declared in this scope
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp: In member function 'void IRrecv::blink13(int)':
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:252: error: 'volatile struct irparams_t' has no member named 'blinkflag'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:254: error: 'OUTPUT' was not declared in this scope
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:254: error: 'pinMode' was not declared in this scope
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp: In function 'void __vector_15()':
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:268: error: 'volatile struct irparams_t' has no member named 'recvpin'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:268: error: 'digitalRead' was not declared in this scope
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:271: error: 'volatile struct irparams_t' has no member named 'rawlen'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:273: error: 'volatile struct irparams_t' has no member named 'rcvstate'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:275: error: 'volatile struct irparams_t' has no member named 'rcvstate'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:284: error: 'volatile struct irparams_t' has no member named 'rawlen'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:285: error: 'volatile struct irparams_t' has no member named 'rawlen'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:287: error: 'volatile struct irparams_t' has no member named 'rcvstate'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:293: error: 'volatile struct irparams_t' has no member named 'rawlen'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:295: error: 'volatile struct irparams_t' has no member named 'rcvstate'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:300: error: 'volatile struct irparams_t' has no member named 'rawlen'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:302: error: 'volatile struct irparams_t' has no member named 'rcvstate'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:310: error: 'volatile struct irparams_t' has no member named 'rcvstate'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:321: error: 'volatile struct irparams_t' has no member named 'blinkflag'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:323: error: 'B00100000' was not declared in this scope
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:326: error: 'B11011111' was not declared in this scope
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp: In member function 'void IRrecv::resume()':
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:332: error: 'volatile struct irparams_t' has no member named 'rcvstate'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:333: error: 'volatile struct irparams_t' has no member named 'rawlen'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp: In member function 'int IRrecv::decode(decode_results*)':
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:343: error: 'volatile struct irparams_t' has no member named 'rawlen'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:344: error: 'volatile struct irparams_t' has no member named 'rcvstate'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp: In member function 'long int IRrecv::decodeNEC(decode_results*)':
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:392: error: 'volatile struct irparams_t' has no member named 'rawlen'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:400: error: 'volatile struct irparams_t' has no member named 'rawlen'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp: In member function 'long int IRrecv::decodeSony(decode_results*)':
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:433: error: 'volatile struct irparams_t' has no member named 'rawlen'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:443: error: 'volatile struct irparams_t' has no member named 'rawlen'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp: In member function 'long int IRrecv::decodeRC5(decode_results*)':
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:518: error: 'volatile struct irparams_t' has no member named 'rawlen'
/Users/Mac/Documents/Arduino/libraries/IRremote/IRremote.cpp:529: error: 'volatile struct irparams_t' has no member named 'rawlen'

Ora a parte che non ho mai inserito il file IRremote.cpp ne il IRremoteInt.h che cosa dovrei fare?
Scusate il post enorme ma vorrei subito capire i miei errori…

Ho anche provato a togliere i 2 file dalla libreria ma non funziona…

Ho appena compilato il tuo programmino per la UNO e la MEGA, con l'IDE 1.0.4, su Windows 7 e va. Prova prima l'ultima libreria IRremote che trovi qui --> https://github.com/shirriff/Arduino-IRremote Se non va, riscarica anche l'ultimo IDE per MAC --> http://arduino.googlecode.com/files/arduino-1.0.4-macosx.zip

IRremote.cpp e IRremoteInt.h sono file necessari per il funzionamento della libreria che vengono richiamati da IRremote.h Credo che l'autore abbia voluto distribuire la libreria su più file e non su uno solo. E' una buona prassi, facilita la manutenzione e l'aggiornamento delle funzioni presenti nella libreria stessa.

ho ricaricato tutto e lo compila.... solo che mentre fa l'upload ad un certo punto dice:

avrdude: stk500v2_ReceiveMessage(): timeout

tutto ok ora va bene

;)