You are on page 1of 1

#include <IRremote.

h>
int RECV_PIN = 3;
int c=0;
IRrecv irrecv(RECV_PIN);
IRsend irsend;
decode_results results;
void setup()
{
pinMode(9, INPUT);
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
}
void loop(){
if (irrecv.decode(&results)){
Serial.println(results.value);
irrecv.resume();
if(results.value==3843267751
)
{
digitalWrite(9,HIGH);
}
else if(results.value==2907792379
)
{
digitalWrite(9,LOW);
}
}
}

You might also like