#include <IRremote.hpp>
const int recvPin = 2; // Pin where the IR receiver is connected
void setup() {
Serial.begin(9600);
IrReceiver.begin(recvPin, ENABLE_LED_FEEDBACK); // Start the receiver
Serial.println("IR Receiver Ready");
}
void loop() {
if (IrReceiver.decode()) {
Serial.print("Received value: ");
Serial.println(IrReceiver.decodedIRData.decodedRawData, HEX); // Print the received value in hexadecimal
IrReceiver.resume(); // Receive the next value
}
}