Skip to content

Instantly share code, notes, and snippets.

@camateg
Last active November 13, 2021 22:21
Show Gist options
  • Select an option

  • Save camateg/3d42be059880edf1967b5f6e153b887d to your computer and use it in GitHub Desktop.

Select an option

Save camateg/3d42be059880edf1967b5f6e153b887d to your computer and use it in GitHub Desktop.
New IR Remote
#include <IRremote.h>
#define IR_PIN 11
IRrecv irrecv(IR_PIN);
void setup() {
Serial.begin(9600);
irrecv.enableIRIn();
}
void loop() {
if (irrecv.decode()) {
//Serial.println(irrecv.decodedIRData.decodedRawData, HEX);
switch(irrecv.decodedIRData.decodedRawData) {
case 0x0:
break;
case 0xE31CFF00:
Serial.println("OK");
break;
default:
Serial.println("NOT OK");
}
irrecv.resume();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment