#include <IRremote.h>
#define IR_RECEIVER_PIN 12 // GPIO pin to which IR receiver OUT is connected
IRrecv irrecv(IR_RECEIVER_PIN);
decode_results results;
void setup() {
Serial.begin(115200);
irrecv.enableIRIn(); // Start the IR receiver
}
void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
irrecv.resume(); // Receive the next value
}
}