#include <IRremote.h>
const int IR_PIN = 0; // GPIO pin connected to the IR receiver
IRrecv irrecv(IR_PIN);
decode_results results;
void setup() {
Serial.begin(9600);
irrecv.enableIRIn(); // Start the IR receiver
}
void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX); // Print the received IR code in hexadecimal
irrecv.resume(); // Receive the next value
}
}