Skip to content

Instantly share code, notes, and snippets.

@surinoel
Created July 13, 2019 04:40
Show Gist options
  • Save surinoel/8787d9a4132142b079fa7954aec91635 to your computer and use it in GitHub Desktop.
Save surinoel/8787d9a4132142b079fa7954aec91635 to your computer and use it in GitHub Desktop.
#include <IRremote.h>
int remote = A0;
IRrecv irrecv(remote);
decode_results results;
void setup() {
Serial.begin(115200);
irrecv.enableIRIn();
pinMode(remote, INPUT);
}
void loop() {
if (irrecv.decode(&results)){
delay(100);
Serial.println(results.value);
irrecv.resume();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment