#include <IRremote.h>
#define IR_RECEIVE_PIN 8
IRrecv IRreceiver(IR_RECEIVE_PIN); // Create an IR receiver object
void setup() {
Serial.begin(9600);
IrReceiver.enableIRIn(); // Enable IR reception
}
void loop() {
if (IrReceiver.decode()) {
IrReceiver.resume();
Serial.println(IrReceiver.decodedIRData.command);
}
}