#include <IRremote.h> // Include the IRremote library
int RECV_PIN = 8; // IR receiver pin
IRrecv irrecv(RECV_PIN); // Create an instance of the IRrecv class
decode_results results; // Variable to store the decoded IR data
void setup() {
Serial.begin(9600); // Initialize serial communication
irrecv.enableIRIn(); // Start the IR receiver
}
void loop() {
if (irrecv.decode(&results)) { // If IR data is receive
if(results.value==0xff6897)
{Serial.print("Received value: ");
Serial.println(results.value);} // Print the received value
else if(results.value==0xff30cf)
{Serial.println("gfde");}
irrecv.resume(); // Receive the next value
// Add your logic here to perform actions based on the received value
}
}