Last active
November 13, 2021 22:21
-
-
Save camateg/3d42be059880edf1967b5f6e153b887d to your computer and use it in GitHub Desktop.
New IR Remote
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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