Skip to content

Instantly share code, notes, and snippets.

@nilsonpessim
Created October 23, 2014 16:30
Show Gist options
  • Save nilsonpessim/8d368e79e99abd723a2d to your computer and use it in GitHub Desktop.
Save nilsonpessim/8d368e79e99abd723a2d to your computer and use it in GitHub Desktop.
#include <IRremote.h>
int RECV_PIN = 2;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn();
}
void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
irrecv.resume();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment