#include <IRremote.h>
int RECV_PIN = 3;
IRrecv IR(RECV_PIN);
// decode_results results;
// char StringValue[6];
int led = 2;
void setup()
{
Serial.begin(9600);
IR.enableIRIn(); // Start the receiver
pinMode(led,OUTPUT);
}
void loop(){
if (IR.decode( )) {
Serial.println(IR.decodedIRData.decodedRawData, HEX);
// Serial.println(StringValue);
if (IR.decodedIRData.decodedRawData == 0xCF30FF00){
digitalWrite(led,HIGH);
}
if (IR.decodedIRData.decodedRawData == 0x9768FF00){
digitalWrite(led,LOW);
}
IR.resume(); // Receive the next value }
}
}