Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include <IRremote.h>
- int RECV_PIN = 11;
- IRrecv irrecv(RECV_PIN);
- decode_results results;
- void setup()
- {
- Serial.begin(9600);
- irrecv.enableIRIn(); // Start the receiver
- pinMode(12,OUTPUT);//Pin For Led
- }
- void loop() {
- if (irrecv.decode(&results)) {
- Serial.println(results.value,DEC);
- if(results.value==33427695)//<--Replace the new decimal value here
- {
- Serial.println("OK Pressed");
- if(digitalRead(12)==LOW)
- {digitalWrite(12,HIGH);
- }
- else{
- digitalWrite(12,LOW);
- }
- }
- irrecv.resume();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement