Skip to content

Instantly share code, notes, and snippets.

Created July 4, 2017 21:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/636179227838d787099e17e22d240ae1 to your computer and use it in GitHub Desktop.
Save anonymous/636179227838d787099e17e22d240ae1 to your computer and use it in GitHub Desktop.
ir-remoto-arduino.c
#include <IRremote.h>
int RECV_PIN = 11; //declaramos el pin que recibira la señal
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup() {
Serial.begin(9600); //inicializamos el puerto serial a 9600
irrecv.enableIRIn(); // Comienza a recibir los datos
}
void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX); // imprime el valor en codigo hexadecimal
irrecv.resume(); // Se preparar para recibir el siguiente valor
delay(10);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment